"check_snmp_patchlevel.pl" plugin giving NULL value

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
nishith
Posts: 28
Joined: Thu Jul 12, 2012 3:45 am

"check_snmp_patchlevel.pl" plugin giving NULL value

Post 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
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Post 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
}
Nicholas Scott
Former Nagios employee
nishith
Posts: 28
Joined: Thu Jul 12, 2012 3:45 am

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Post 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
yancy
Posts: 523
Joined: Thu Oct 06, 2011 10:12 am

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Post by yancy »

nishith,

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

Code: Select all

 sestatus 

Regards,

-Yancy
nishith
Posts: 28
Joined: Thu Jul 12, 2012 3:45 am

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Post by nishith »

SELinux status: disabled
nishith
Posts: 28
Joined: Thu Jul 12, 2012 3:45 am

Re: "check_snmp_patchlevel.pl" plugin giving NULL value

Post by nishith »

I have removed this plugin & replaced with "check_snmp" plugin, which worked great as per my need.


Thanks.
Locked