return code ??? out of bounds
Re: return code ??? out of bounds
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.
- Attachments
-
cmst_plugin.pl- (10.54 KiB) Downloaded 475 times
Re: return code ??? out of bounds
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!
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: return code ??? out of bounds
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.
Those return codes don't make any sense in terms of the code. It can only return 0,1,2,3.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: return code ??? out of bounds
I suspect that you'll need to enable debugging for Nagios.
Make the unknown error occur.
Then look at the log /usr/local/nagios/var/nagios.debug
When you are finished this turns debugging off:
FYI feature request submitted:
https://github.com/NagiosEnterprises/na ... issues/132
Code: Select all
sed -i 's/.*debug_level=.*/debug_level=-1/g' /usr/local/nagios/etc/nagios.cfg
service nagios restartThen 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 restartFYI feature request submitted:
https://github.com/NagiosEnterprises/na ... issues/132
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: return code ??? out of bounds
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.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: return code ??? out of bounds
@jssingh Any updates?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: return code ??? out of bounds
Code: Select all
cat > eric.pl
use lib oldPerlKnowledge;
use strict;
use vars qw($thisWillNeverWork, $disclaimEverything);
^D
./eric.pl -thisWillNeverWork -disclaimEverything=true
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.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: return code ??? out of bounds
@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.
@box293 I've turned debugging on. When the error happens again, I'll take a look. thanks.
Re: return code ??? out of bounds
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.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: return code ??? out of bounds
@jssingh, we will keep the thread open for the time being. Let us know if the issue resurfaces.@box293 I've turned debugging on. When the error happens again, I'll take a look. thanks.
Be sure to check out our Knowledgebase for helpful articles and solutions!