Nagios showcase project !

Sean Perry sean.perry at intransa.com
Thu Sep 25 19:58:33 CEST 2003


jeff vier wrote:

> Use MySQL, script a quick loop.
> 
> That's how I did it, anyway.
> 
> Then I decided it needed to be a smarter system, and I wront a proper
> script.  Takes about 5 seconds to add a new host's hostextinfo and
> serviceextinfo.  and it's dynamic.
> 
> I can post it, if anyone's interested.  it's pretty simple (to me,
> anyway).
> 

Yeah I did something similar as well.  I have a xml file which defines 
hosts and a script which reads it and outputs the nagios .cfg files.

<host>
   <name>terminator</name>
   <type>linux</type>
   <group>engr-srv</group>
   <services>
     <service>http</service>
   </services>
</host>

My script takes groups and types and automatically adds service checks 
for things like memory, cpu, etc.  If the host is a win2k machine it 
also use check_nt to find out which drives it has and lists them for 
disk usage checks.

One of the things that drove me crazy about the nagios cfg format is 
there is so much duplication.  This lets me easily define and change 
machines and not forget to update one of the files.

As for the XML itself, well I had never written an XML based app and 
this seemed like a good project to learn with.  Not one of those XML 
everywhere types, honest.




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
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