Verion 2.0b4 how does cgi's nagios_check_command work?
Andreas Ericsson
ae at op5.se
Fri Oct 7 13:23:37 CEST 2005
John P. Rouillard wrote:
> Hi all:
>
> I have groveled through the cgi files in nagios 2.0b4 and I can't find
> any instance of the nagios_check_command actually being executed. Am I
> just missing it somewhere?
>
The nagios_check_command has been incorporated into the cgi's. That's
why the status.dat file has the nagios entry on top.
> cgiutils.c load the variable from the config file
> extinfo.c checks to see if the variable is empty and produces a nice
> little warning if it is.
>
> but nothing seems to actually execute the command. The reason I ask is
> that nagios was down and the cgi's all happily reported that it was
> up. Could this be because the host and service status files were
> available since the machine crashed?
>
Yes, that's almost certainly it. There is no really good way of
detecting that nagios is actually running unless you're logged in as
root. Noone (sane) runs their webserver as root.
--
Andreas Ericsson andreas.ericsson at op5.se
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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