[Nagiosplug-devel] [ nagiosplug-Bugs-719783 ] check_procs -a strstr result test wrong?
SourceForge.net
noreply at sourceforge.net
Fri Apr 11 09:17:07 CEST 2003
Bugs item #719783, was opened at 2003-04-11 12:32
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=719783&group_id=29880
Category: Argument proccessing
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Laurent Vaslin (laurentv)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_procs -a strstr result test wrong?
Initial Comment:
Hi,
I'm using nagios-plugins-1.3.0 (stable release) on a
solaris 8 sparc machine
I'm monitoring perl processes running as show with
command:
ps -Ao 's uid ppid comm args' |grep perl
S 0 1 /usr/bin/perl
/usr/bin/perl /usr/local/script/test.pl
S 0 1 /usr/bin/perl
/usr/bin/perl /usr/local/script/prod.pl
The command :
check_procs -w 1: -c 1: -a /usr/local/script/prod.pl
return
CRITICAL - 0 processes running with
args /usr/local/script/prod.pl
My investigations leads me to the following file
nagios-plugins-1.3.0/plugins/check_progs.c
Ligne 138 (strstr (procargs, args) == procargs))
Shoudn't it be
(strstr (procargs, args) != NULL))
then check_procs -w 1: -c 1: -a /usr/local/script/prod.pl
return
OK - 2 processes running with
args /usr/local/script/prod.pl
and
check_procs -w 1: -c 1: -C /usr/bin/perl -
a /usr/local/script/prod.pl
return OK - 1 processes running with command
name /usr/bin/perl, args /usr/local/script/prod.pl
Am I correct ?
Tks
Laurent
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=719783&group_id=29880
More information about the Devel
mailing list