|
|
| Browse NETS topics: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z | |
March 13, 2004
NAGIOS PROCESS CHECK COMMANDFirst, let me say that nagios is a *great* and powerful framework for monitoring your network, servers, etc.
In setting up the command to verify that the nagios service itself is running, I ran into a syntax issue that varied from the example provided in the cgi.cfg file. Since nearly all the other examples provided have been accurate, I figured I'd share what I found.
The existing line in the cgi.cfg (loacted in /usr/local/nagios/etc if you followed the install convention) for nagios_check_command is:
If you run this from the command line it will fail as the check_nagios command requires command line switches before each parameter. So I messed around with the command line directly and got it to work (*from the command line*) with:nagios_check_command=/usr/local/nagios/libexec/check_nagios /usr/local/nagios/var/status.log 5 '/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg'
Much to my dismay, though, this still did not work from the cgi. So, I took a hint from the output of check_nagios -h and tried the following:/usr/local/nagios/libexec/check_nagios -F /usr/local/nagios/var/status.log -e 5 -C '/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg'
This worked. I'm not sure if it was the order of the parameter or simple matching only the first part of the output from the ps command. I suspect it is the latter.nagios_check_command=/usr/local/nagios/libexec/check_nagios -e 5 -F /usr/local/nagios/var/status.log -C /usr/local/nagios/bin/nagiosPosted by wintermute at March 13, 2004 11:19 PM