./check_snmp Errors (External command error)

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
jdworske
Posts: 10
Joined: Tue Jun 24, 2014 3:47 pm

./check_snmp Errors (External command error)

Post by jdworske »

Nagios Community,

I am having some problems with:

./check_snmp

Error:

External command error: Timeout: No Response from 192.168.0.29:161

From my Nagios server I can successfully snmpwalk the host 192.168.0.29:

[root@hq-nagios-02 libexec]# snmpwalk -v 2c -c 'xxxxxxx' 192.168.0.29 | more
SNMPv2-MIB::sysDescr.0 = STRING: Linux hq-schd-01.myvest.com 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed Jun 12 03:34:52 UTC 2013 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (62844) 0:10:28.44
SNMPv2-MIB::sysContact.0 = STRING: Anton Zavrin (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: hq-schd-01.myvest.com
SNMPv2-MIB::sysLocation.0 = STRING: Quest, Atlanta, GA (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDMIBObjects.3.1.1
SNMPv2-MIB::sysORID.2 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.3 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.4 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.5 = OID: TCP-MIB::tcpMIB


From that same host I an snmpwalk localhost successfully.



[root@hq-schd-01 snmp]# snmpwalk -v 2c -c 'xxxxx' localhost | more
SNMPv2-MIB::sysDescr.0 = STRING: Linux hq-schd-01.myvest.com 2.6.32-358.11.1.el6.x86_64 #1 SMP Wed Jun 12 03:34:52 UTC 2013 x86_64
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.10
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (67509) 0:11:15.09
SNMPv2-MIB::sysContact.0 = STRING: Anton Zavrin (configure /etc/snmp/snmp.local.conf)
SNMPv2-MIB::sysName.0 = STRING: hq-schd-01.myvest.com
SNMPv2-MIB::sysLocation.0 = STRING: Quest, Atlanta, GA (edit /etc/snmp/snmpd.conf)
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (2) 0:00:00.02
SNMPv2-MIB::sysORID.1 = OID: SNMP-MPD-MIB::snmpMPDMIBObjects.3.1.1


Problem is now when I use the check_snmp script on my Nagios server I am getting the following error:

[root@hq-nagios-02 libexec]# ./check_snmp -H 192.168.0.29 -C 'xxxxxxx' -o ".1.3.6.1.2.1.25.6.3.1.4.159"
External command error: Timeout: No Response from 192.168.0.29:161.

I have tried all sorts of iterations of the check_snmp command with different parameters, however, still not able to get this to work ?

Nagios Server is running Nagios Core 4.0.7 on CentOS:

[root@hq-nagios-02 libexec]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m


Client machine is also CentOS:

root@hq-schd-01 snmp]# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m

Any thoughts / help much appreciated!!!

I am able to execute external commands from the web interface!

:-)

Thank you,
John Dworske
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: ./check_snmp Errors (External command error)

Post by Box293 »

Try adding -P 2c to your command:

Code: Select all

./check_snmp -H 192.168.0.29 -P 2c -C 'xxxxxxx' -o ".1.3.6.1.2.1.25.6.3.1.4.159"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
jdworske
Posts: 10
Joined: Tue Jun 24, 2014 3:47 pm

Re: ./check_snmp Errors (External command error)

Post by jdworske »

Box293,

Thanks man. You rock. That worked.

John
Locked