Generating nagios configs from LDAP, nmap, and traceroute

Luke Rosenthal luke at luko.org
Thu Dec 18 01:07:30 CET 2003


> > I'll have to look more closely at nagmin.  Thanks.
> 
> I do mine manually.  tried nagmin, hated it (i found it's like using a
> WYSIWYG HTML editor - sure, it *mostly* works, but the end result isn't
> pretty).

Yeah, plus if it's all just generated in a big lump, you tend never to 
really understand it the same as if you'd written it yourself by hand.  In 
the short term it's easier but in the longer term you end up scratching 
your head more, and wasting more time trying to understand what's been 
generated!  Like reading somebody elses sloppy code!

> I've written a lot of scripts to do things like gen apan config entries
> and push extinfo and such.  But hosts.cfg and hostgroups.cfg and
> services.cfg (etc) are all by hand.

I find the best way is to whip up a quick and dirty perl script (or
bash/sed/awk, whatever) to mangle the data out of whatever form it's in
and turn it into something I can paste into the config.  It sounds old
fashioned, but you would be surprised how often we export from whatever
data source (usually windows-based, like Maximizer, ugh) to a flat text
comma-delimited file, then just mangle that out into a series of config
entries using perl.  We only do this infrequently tho (once every few
months) and it only takes me half an hr or so each time.  Sure beats data
entry!!

> I watch 247 hosts and 1111 services (and counting).

Bout the same for us.  Next step is trying to implement something with
net::ssh::perl that logs in and restarts services that fail, somehow
linked to event handlers.  Anyone had experience with this?  Could
check_by_ssh be given some creative commandline arguments?

Luke.



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list