Page 1 of 1

"check_snmp_patchlevel.pl" plugin giving NULL value

Posted: Fri Aug 03, 2012 5:52 am
by nishith
Hello Nagios Experts,

I am getting NULL value in my nagios frontend, while the same plugin is worked properly through command line. Please have a look of my Nagios configuration.

File "CISCO-PATCH.CFG"
define service {
use generic-patch-nw
host_name Cisco 2960 Switch_10
service_description check_snmp_ios
check_command check_snmp_cisco_ios!-C g1plcis2960
}

File "COMMANDS.CFG"
define command{
command_name check_snmp_cisco_ios
command_line $USER1$/check_snmp_patchlevel.pl -H $HOSTADDRESS$ -g ios -C $ARG1$
}

################################################
Through Linux Shell, executed below command.

./check_snmp_patchlevel.pl -H 192.168.1.1 -C snmp4admin -g ios
IOS Version: 12.4(11)T1 | Cisco IOS Software, 2801 Software (C2801-ADVIPSERVICESK9-M), Version 12.4(11)T1, RELEASE SOFTWARE (fc5)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2007 by Cisco Systems, Inc.
Compiled Thu 25-Jan-07 14:08 by prod_rel_team

Thus, the same value doesn't reflect in Nagios Front End. So, please let me know how to resolve this issue.

Advanced Thanks,
Nishith N.Vyas

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Posted: Fri Aug 03, 2012 9:34 am
by nscott
Null values generally always mean that either the path, permissions or command definition is messed up somehow. Are you running SELinux of some kind?

I do notice a possible error in your service definition, looks like you duplicated the -C flag.

Code: Select all

define service {
use generic-patch-nw
host_name Cisco 2960 Switch_10
service_description check_snmp_ios
check_command check_snmp_cisco_ios!-C g1plcis2960
}
Should be:

Code: Select all

define service {
use generic-patch-nw
host_name Cisco 2960 Switch_10
service_description check_snmp_ios
check_command check_snmp_cisco_ios!g1plcis2960
}

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Posted: Fri Aug 03, 2012 11:35 am
by nishith
Thanks for prompt response.

Basically, i remove that "-C" from the configuration file. It worked well for an hours,but after that again it has started showing "NULL" value. I don't know what's going wrong with Nagios configuration. I have set full permission (i.e. 777 to that nagios plugin) with "root" ownership.

Still it is not working.

Nishith

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Posted: Fri Aug 03, 2012 2:06 pm
by yancy
nishith,

can you run the following to check the status of SELinux.

Code: Select all

 sestatus 

Regards,

-Yancy

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Posted: Sat Aug 04, 2012 2:13 am
by nishith
SELinux status: disabled

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Posted: Mon Aug 13, 2012 7:25 am
by nishith
I have removed this plugin & replaced with "check_snmp" plugin, which worked great as per my need.


Thanks.