Page 2 of 3
Re: return code ??? out of bounds
Posted: Tue Jun 07, 2016 5:39 pm
by jssingh
I've attached the plugin. It's for testing the read/write speed of a lustre filesystem. It also relies on a binary executable. I don't know how to get that to you. The binary is compiled for SLES 11.
Re: return code ??? out of bounds
Posted: Tue Jun 07, 2016 5:49 pm
by eloyd
Did you try doing what it said?
Code: Select all
author: XXXXXXXXX/NASA Advanced SuperComputing Facility
# email: [email protected]
#
# please report any bugs or other issues to the author, thanks!
Re: return code ??? out of bounds
Posted: Tue Jun 07, 2016 5:55 pm
by jssingh
yep.

he can't figure out what's going on either.
Those return codes don't make any sense in terms of the code. It can only return 0,1,2,3.
Re: return code ??? out of bounds
Posted: Tue Jun 07, 2016 7:44 pm
by Box293
I suspect that you'll need to enable debugging for Nagios.
Code: Select all
sed -i 's/.*debug_level=.*/debug_level=-1/g' /usr/local/nagios/etc/nagios.cfg
service nagios restart
Make the unknown error occur.
Then look at the log
/usr/local/nagios/var/nagios.debug
When you are finished this turns debugging off:
Code: Select all
sed -i 's/.*debug_level=.*/debug_level=0/g' /usr/local/nagios/etc/nagios.cfg
service nagios restart
FYI feature request submitted:
https://github.com/NagiosEnterprises/na ... issues/132
Re: return code ??? out of bounds
Posted: Tue Jun 07, 2016 8:41 pm
by eloyd
I'm thinking that running it from the command line on the Nagios server, as the nagios user, will also shed some light on things.
Re: return code ??? out of bounds
Posted: Wed Jun 08, 2016 11:40 am
by lmiltchev
@jssingh Any updates?
Re: return code ??? out of bounds
Posted: Wed Jun 08, 2016 12:01 pm
by eloyd
Code: Select all
cat > eric.pl
use lib oldPerlKnowledge;
use strict;
use vars qw($thisWillNeverWork, $disclaimEverything);
^D
./eric.pl -thisWillNeverWork -disclaimEverything=true
Okay, so my attempt at perl humor aside, debugging this remotely will never work without a lot of dev time trying to figure out exactly what it does, especially without the .../lib/cmst program to do the heavy lifting.
I'm _guessing_ that the various result codes are being caused by that cmst program. Look at lines 289 and 304 and you'll see that the perl code is blindly passing along the exit code of your cmst program without parsing it into Nagios 0/1/2 first. I'm guessing that there's something different/unexpected/changed/broken with that external program and/or how it's being activated through this (very complex) perl code that is now causing it to fail unexpectedly, and pass along seemingly random results, that the plugin is passing along without checking first.
Re: return code ??? out of bounds
Posted: Wed Jun 08, 2016 2:41 pm
by jssingh
@eloyd thanks for catching that. I'll look into it. I've never had a problem with running it from the command line as the nagios user, but then again if you run this too often it hammers the filesystem, so I run it from the command line sparingly. We only run the nagios check every half hour.
@box293 I've turned debugging on. When the error happens again, I'll take a look. thanks.
Re: return code ??? out of bounds
Posted: Wed Jun 08, 2016 3:16 pm
by eloyd
Only thank me if it's useful. Like I said, that's my quick examination of the code, as I was only looking for exit points.
Re: return code ??? out of bounds
Posted: Wed Jun 08, 2016 4:02 pm
by lmiltchev
@box293 I've turned debugging on. When the error happens again, I'll take a look. thanks.
@jssingh, we will keep the thread open for the time being. Let us know if the issue resurfaces.