Page 1 of 2
null results with check_iseries.pl
Posted: Tue Dec 20, 2011 11:31 am
by mariof
Hi,
When I run the check_iseries.pl from the command line (as the nagios user), I get an expected result:
check_iseries OK - Current ASP used (%): 65.75 | total=564519763968b;; usage=371182460928b;;
When I run the same command within XI, i get a "null" result.
The script makes use of the Nagios::Plugin, but I was wondering is XI understands the output from the nagios_exit subroutine.
Any information will be helpful - my perl is very rusty.
Thanks in advance
Mario
Re: null results with check_iseries.pl
Posted: Tue Dec 20, 2011 12:12 pm
by lmiltchev
Mario,
Can you post (place a screenshots) of your service and command definitions of this check in Nagios XI?
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 4:09 am
by mariof
Hi,
here are the screen shots - nothing very remarkable, and the command line uses the same syntax.
nagios_iseries_command.png
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 4:12 am
by mariof
I've also checked the nagios logs but all i can see is that the result is null. Is there a way of debugging this. using the -v option didn't help me.
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 10:04 am
by lmiltchev
mariof,
You can try adding "perl" in the path (in your command definition), so for example, instead of:
you will have:
Code: Select all
/usr/bin/perl $USER1$/check_iseries.pl -H ...
or
Code: Select all
/usr/bin/perl /usr/local/nagios/libexec/check_iseries.pl -H ...
Can you also post your actual check command that you use from the command line? You've shown only the check results in your first post.
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 10:37 am
by mariof
Hi,
Here is the command with the community string removed (run as the nagios user from /usr/local/nagios/libexec):
./check_iseries.pl -H servername -c <string> -t 20 -o asp -w 80
check_iseries OK - Current ASP used (%): 65.77 | total=564519763968b;; usage=371295047680b;;
I also tried both your suggested changes to the command and it still didn't work. I think XI doesn't like the output from the command, but I can't tell for sure.
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 10:39 am
by mariof
PS - i do use other snmp based perl scripts successfully. check_snmp_storage.pl and check_snmp_load.pl for example.
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 10:45 am
by lmiltchev
mariof,
We will do some more digging and will get back to you when/if we find a solution.
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 10:50 am
by mariof
Thank you.
Not sure if this helps nor not, but neither check_snmp_load.pl or check_snmp_storage.pl use Nagios::Plugin
Re: null results with check_iseries.pl
Posted: Wed Dec 21, 2011 10:54 am
by mariof
i fixed it!
i should have checked before, but i needed to change:
use lib "/usr/lib/nagios/plugins";
to
use lib "/usr/local/nagios/libexec";