nagios api

Jason Martin jhmartin at toger.us
Tue Mar 30 18:49:58 CEST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Current status can be determined by looking at the status.log file. It 
contains a near-real-time view of all current states.  If you compiled 
with mySQL support that data will be stored in one of the mysql tables.

The nagios.cmd API is defined at 
http://nagios.sourceforge.net/docs/1_0/extcommands.html.

Plugins are managed by the people on the nagios plugin developers list, at 
nagiosplug-devel at lists.sourceforge.net.

- -Jason Martin

On Tue, 30 Mar 2004, Tony Sceats wrote:

> hey there...
> 
> first all, love your work :) 
> 
> So, I suppose I have 1 question and one
> suggestion.. the first question is does Nagios have an API, and is it
> documented anywhere? If so, I suppose it would be in C or C++ ? 
> 
> The reason I ask is that I a while
> ago now I wrote a cgi script that will list all the hosts currently
> monitored with nagios.. it does this by parsing the relevant config files, and will display this list as series of options.. for each host selected it will put a comment in nagios by writing to the named pipe file (in debian at least /var/log/nagios/rw/nagios.cmd ).
> 
> So, anyway, I can see a few other uses to the interface that i've created
> including easy mass acknowledging of problems and scheduling
> downtime for a seemingly random set of hosts/services (in terms of the config - ie, hosts
> in different groups etc), but in order to do so it would be better to
> get a list of things in a certain state. I know this is possible via the
> cgi interface, however I would ultimatley prefer not to have to strip
> html etc etc to get this list.. so, is there a way to get this via an API of
> some kind?
> 
> And I suppose a related question would be how would one acknowledge
> things and schedule downtime for this list? Is there a way to do this
> via the named pipe file used for comments mentioned above? 
> 
> The suggestion I have is really for some of the plugins, I'm not sure if
> this is the right place to put this... But anyway, it would be nice if they
> supported an option to specify a source address. I have already patched
> check_http to do this (well, in fact I modified netutils.c), although
> I did this dodgely, as I hard coded the IP (I was extremely short of
> time to do this by the time it was considered to be the only option
> forward). During the course of going over the code it was seen clearly
> that a lot of the plugins would require to be patched as the change had
> to be made to the my_connect function in netutils.. so I would like to
> put this forward as a suggestion for future versions of the core
> plugins.
> 
> anyway, thanks for your time.
> 
> Tony Sceats
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.3.5 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQFAaaU5l2ODWuqVSBMRAjtIAJ4jL2ZZ4E5yDPkVDmQQnVucawc0TQCdGLyz
OY8jXSeFOmcoLEtbslmpngs=
=A5x8
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click




More information about the Developers mailing list