check_nagios command not picking up nagios process

Jason Lixfeld jason+lists.nagios at lixfeld.ca
Thu Mar 4 20:44:20 CET 2004


I think I got it.  It would appear the ps syntax is from linux, not bsd.

ps -weo 'stat uid ppid comm args' won't show all processes on a bsd 
box. you need ps -axweo.

ahhh, much better:

su-2.05b# ./check_procs -C slapd
OK - 1 processes running with command name slapd
su-2.05b# ./check_procs -C nagios
OK - 1 processes running with command name nagios
su-2.05b#

perhaps a modification to autoconf detecting platform and using command 
syntax changes based on platform would help.

On Mar 4, 2004, at 2:21 PM, Jason Lixfeld wrote:

> On Mar 4, 2004, at 2:12 PM, C. Bensend wrote:
>
>>
>>> That didn't work for me.  It would appear that check_nagios
>>> (check_procs) is very picky about what it will match.  It will match
>>> some commands, but it will  not match the same command with a varied
>>> command line execution.  Dumb.  How can I fix this?
>>>
>>> su-2.05b# ps xa|grep nagios
>>>   8519  ??  Ss     0:02.62 /usr/local/bin/nagios -d
>>> /usr/local/etc/nagios/nagios.cfg
>>> 17485  p0  R+     0:00.00 grep nagios
>>> su-2.05b# /usr/local/libexec/nagios/check_nagios -F
>>> /var/spool/nagios/status.log -e 5 -C "/usr/local/bin/nagios"
>>> Could not locate a running Nagios process!
>>
>> Um.  Pardon me if this has already been answered, but is 'ps xa' the 
>> exact
>> ps command check_nagios is using?  I haven't followed this entire 
>> thread,
>> so this might have been covered.
>>
>> Check your config.h for the _exact_ ps command it's using, and then 
>> try
>> that from the command line.  What's different about the output you're
>> getting, and the output check_nagios is expecting?
>
> I can't find anything in config.h about the correct ps command or 
> syntax.
>
>> Benny
>>
>>
>> -- 
>> "Have you ever tried simply turning off the TV, sitting down with your
>> children, and hitting them?"                   -- Bender, "Futurama"
>>
>>
>> -------------------------------------------------------
>> 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-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
>
>
>
> -------------------------------------------------------
> 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-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



-------------------------------------------------------
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-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