<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2723.2500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>check_nagios gets a ps list and searches for the
final arguement in the check_nagios command line</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>nagios_check_command=/usr/local/nagios/libexec/check_nagios
/usr/local/nagios/var/status.log 5 '/usr/local/nagios/bin/nagios'</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>In this case it checks for
/usr/local/nagios/bin/nagios</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The Documentation:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># Note: If you are using the check_nagios plugin
here, the first<BR># argument should be the physical path to the status log, the
<BR># second argument is the number of minutes that the status log <BR>#
contents should be "fresher" than, and the third argument is the<BR># string
that should be matched from the output of the 'ps' <BR># command in order to
locate the running Nagios process. That<BR># process string is going to
vary depending on how you start<BR># Nagios. Run the 'ps' command manually
to see what the command<BR># line entry for the Nagios process looks
like.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Suggest that i should run 'ps' to see what it
returns.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Wether I am the Nagios user or root ps has
inappropriate return values for this check command.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># ps <BR> PID
TTY TIME CMD<BR> 534
tty1 00:00:00 mingetty<BR> 535
tty2 00:00:00 mingetty<BR> 536
tty3 00:00:00 mingetty<BR> 537
tty4 00:00:00 mingetty<BR> 538
tty5 00:00:00 mingetty<BR> 539
tty6 00:00:00 mingetty<BR> 1860
pts/8 00:00:00 bash<BR>14765 pts/3 00:00:00
bash<BR>11225 pts/6 00:00:00 bash<BR>12483
pts/9 00:00:00 bash<BR>12490 pts/9 00:00:01
ssh<BR>12509 pts/10 00:00:00 bash<BR>12540 pts/10
00:00:00 ssh<BR>12774 pts/11 00:00:00 bash<BR>12805
pts/11 00:00:00 ssh<BR>19339 pts/2 00:00:00
bash<BR>22771 pts/5 00:00:00 shell<BR>22772
pts/5 00:00:00 ssh<BR>24309 pts/12 00:00:00
bash<BR>28146 pts/6 00:00:01 ssh<BR>28993 pts/13
00:00:00 bash<BR>29269 pts/12 00:00:00 ssh<BR>29309
pts/14 00:00:00 bash<BR>29316 pts/14 00:00:00
ssh<BR> 8053 pts/15 00:00:00 bash<BR>11875
pts/0 00:00:00 bash<BR>14706 pts/2 00:00:00
ps</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Although I assure you nagios IS
running</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2># ps waux | grep nagios<BR>nagios
12253 0.0 0.0 1560 880
? S
12:32 0:00 ./nagios -d ../etc/nagios.cfg</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Is there a way to change the command line for ps so
that I can have it return the appropriate
information?</FONT></DIV></BODY></HTML>