check_nagios and ps problem

Shawn McCool smccool at ascendantmedia.com
Wed Mar 26 19:53:05 CET 2003


check_nagios gets a ps list and searches for the final arguement in the check_nagios command line

nagios_check_command=/usr/local/nagios/libexec/check_nagios /usr/local/nagios/var/status.log 5 '/usr/local/nagios/bin/nagios'

In this case it checks for /usr/local/nagios/bin/nagios



The Documentation:

# Note: If you are using the check_nagios plugin here, the first
# argument should be the physical path to the status log, the 
# second argument is the number of minutes that the status log 
# contents should be "fresher" than, and the third argument is the
# string that should be matched from the output of the 'ps' 
# command in order to locate the running Nagios process.  That
# process string is going to vary depending on how you start
# Nagios.  Run the 'ps' command manually to see what the command
# line entry for the Nagios process looks like.

Suggest that i should run 'ps' to see what it returns.

Wether I am the Nagios user or root ps has inappropriate return values for this check command.

# ps 
  PID TTY          TIME CMD
  534 tty1     00:00:00 mingetty
  535 tty2     00:00:00 mingetty
  536 tty3     00:00:00 mingetty
  537 tty4     00:00:00 mingetty
  538 tty5     00:00:00 mingetty
  539 tty6     00:00:00 mingetty
 1860 pts/8    00:00:00 bash
14765 pts/3    00:00:00 bash
11225 pts/6    00:00:00 bash
12483 pts/9    00:00:00 bash
12490 pts/9    00:00:01 ssh
12509 pts/10   00:00:00 bash
12540 pts/10   00:00:00 ssh
12774 pts/11   00:00:00 bash
12805 pts/11   00:00:00 ssh
19339 pts/2    00:00:00 bash
22771 pts/5    00:00:00 shell
22772 pts/5    00:00:00 ssh
24309 pts/12   00:00:00 bash
28146 pts/6    00:00:01 ssh
28993 pts/13   00:00:00 bash
29269 pts/12   00:00:00 ssh
29309 pts/14   00:00:00 bash
29316 pts/14   00:00:00 ssh
 8053 pts/15   00:00:00 bash
11875 pts/0    00:00:00 bash
14706 pts/2    00:00:00 ps

Although I assure you nagios IS running

# ps waux | grep nagios
nagios   12253  0.0  0.0  1560  880 ?        S    12:32   0:00 ./nagios -d ../etc/nagios.cfg

Is there a way to change the command line for ps so that I can have it return the appropriate information?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20030326/5ebeca30/attachment.html>


More information about the Users mailing list