[Nagiosplug-devel] [ nagiosplug-Bugs-1086739 ] check_nagios anomoly with 1.4 vs. 1.3.1

SourceForge.net noreply at sourceforge.net
Tue Dec 28 16:33:00 CET 2004


Bugs item #1086739, was opened at 2004-12-16 15:41
Message generated for change (Comment added) made by madhamster
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1086739&group_id=29880

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: madhamster (madhamster)
Assigned to: Ton Voon (tonvoon)
Summary: check_nagios anomoly with 1.4 vs. 1.3.1

Initial Comment:
When using check_nagios 1.3.1 and the check_nagios
command from either the commandline or from the cgi.cfg
(/usr/local/nagios/libexec/check_nagios
/usr/local/nagios/var/status.log 5
'/usr/local/nagios/bin/nagios'), the "nagios" process
can be found just fine.  However, when using the
1.4alpha2 plug-ins, the check_nagios binary will only
return a correct answer with
/usr/local/nagios/libexec/check_nagios
/usr/local/nagios/var/status.log 5 'nagios' (only
"nagios" being passed to the "ps" command).

Is the ps command being invoked in a different way
between the 1.3.1 and 1.4alpha2 check_nagios binaries?

I would try with 1.4alpha3, but I cannot get it to
complie as of yet, although I just successfully
recompiled 1.4alpha2 and 1.3.1...

----------------------------------------------------------------------

>Comment By: madhamster (madhamster)
Date: 2004-12-28 18:32

Message:
Logged In: YES 
user_id=1179843

The lastest HEAD check_nagios works as expected now using
the longer process name.

Thanks guys!  Great work!

--Paul

----------------------------------------------------------------------

Comment By: Benoit Mortier (opensides)
Date: 2004-12-28 16:19

Message:
Logged In: YES 
user_id=388184

Yes i have worked on check_icmp, it compile fine on my box could you 
try the latest cvs and tell me if it works by you.. 
 
Thanks 

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2004-12-28 14:46

Message:
Logged In: YES 
user_id=664364

Paul,

I think Benoit is working on check_icmp. In the meantime, you should be 
able to cd plugins/ and run "make check_nagios" to compile the 
check_nagios plugin.

Ton

----------------------------------------------------------------------

Comment By: madhamster (madhamster)
Date: 2004-12-26 20:29

Message:
Logged In: YES 
user_id=1179843

Ton,

When I get 1.4alpha to compile all the way through, I will
test this out again.  Now that the issue with check_http is
solved, I get an error on check_icmp- but I am sure that
will be resolved soon.

Thanks for all of your hard work!

--Paul

----------------------------------------------------------------------

Comment By: madhamster (madhamster)
Date: 2004-12-20 20:04

Message:
Logged In: YES 
user_id=1179843

Ton,

In order to check this out, I am guessing we have to get the 
1.4alpha3 or the current snapshot working with the 
check_http?  The reason I ask, is I tried copying over 
check_nagios.c to 1.4alpha2 (since I can get it to compile) 
and now, I get an error when it gets to check_nagios:

gcc  -g -O2  -L. -L/usr/lib -o check_procs  check_procs.o 
utils.o ../lib/libnagiosplug.a popen.o
source='check_nagios.c' object='check_nagios.o' libtool=no depfile='.deps/check_nagios.Po' 
tmpdepfile='.deps/check_nagios.TPo' depmode=gcc3 /bin/sh ../depcomp gcc -DLOCALEDIR=\/usr/local/nagios/share/locale\ -
DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -
I/usr/include/ldap -I/include -I/usr/include   -I/include -
I/usr/kerberos/include  -g -O2 -c `test -f 'check_nagios.c' || 
echo './'`check_nagios.c
gcc  -g -O2  -L. -L/usr/lib -o check_nagios  check_nagios.o 
utils.o ../lib/libnagiosplug.a popen.o
check_nagios.o(.text+0x553): In function `main':
/usr/local/src/nagios-plugins-
1.4.0alpha2/plugins/check_nagios.c:74: undefined reference 
to `usage4'
check_nagios.o(.text+0x575):/usr/local/src/nagios-plugins-
1.4.0alpha2/plugins/check_nagios.c:70: undefined reference 
to `usage4'
collect2: ld returned 1 exit status
make[2]: *** [check_nagios] Error 1
make[2]: Leaving directory `/usr/local/src/nagios-plugins-
1.4.0alpha2/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/nagios-plugins-
1.4.0alpha2'
make: *** [all] Error 2


Attached is the config.log if you need that.

--Paul Wiggins

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2004-12-20 16:22

Message:
Logged In: YES 
user_id=664364

Madhamster,

After looking at the code (and two commits), have managed to restore 
the original functionality. The -C flag will do a substring search based on 
the process arguments, not the short command name. Can you try the 
snapshot to see if this works correctly.

Ton

----------------------------------------------------------------------

Comment By: madhamster (madhamster)
Date: 2004-12-17 08:28

Message:
Logged In: YES 
user_id=1179843

I just wanted to make sure that things were working the way
you intended them to.  I didn't know if the short name would
impact the reliability (and I am pretty sure it won't).  The
cgi.cfg-sample file's nagios_check_command line (with nagios
1.1 and 1.2) references the full path for the nagios_check
plug-in- and when i upgraded the plug-ins from 1.3.1 to
1.4alpha2, the nagios_check suddenly stopped working as I
had expected it to.

According to the 1.4alpha2 nagios_check --help, the -C still
expects the full path as opposed to the short name.  You may
want to change that.  Also, with Nasios 2 is released, you
may want the cgi-cfg-sample's nagios_check_command to
reference just teh short name if the new plug-ins are going
to work this way...  Just a thought.

And , great work on the software.  You are helping us save a
lot of time a see problems before the users do!

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2004-12-17 01:15

Message:
Logged In: YES 
user_id=664364

Madhamster,

Thanks for the report. Yes, check_nagios has had a change in 1.4 as it 
now uses the same information that check_procs uses.

However, check_procs has had -C changed so that it only reports the 
shortname of the command (without the full path). This is for consistency 
because some OS only return the short path in their ps output.

Unfortunately, this has affected check_nagios. Is it sufficient to check 
just the shortname? Alternatively, we could check the args output, which 
would be the full output including argument values.

Do you have an opinion?

Ton

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1086739&group_id=29880




More information about the Devel mailing list