Page 1 of 2

check_snmp nagios

Posted: Wed Sep 23, 2015 3:14 pm
by alexprinou
I can not get the SNMP data in IP-10 Ceragon, the MIB file does not work in the check_snmp nagios.
What can is wrong?

code:
./check_snmp Aidu-MIB -m -h 172.169.254.2 -c -o iso.3.6.1.4.1.2281.1.7.2.1 publicceragon

return:
check_snmp v2.0.3 (nagios-plugins 2.0.3)
Copyright (c) 1999-2014 Nagios Plugin Development Team
<[email protected]>

Check status of remote machines and obtain infor- system information via SNMP


Usage:
check_snmp -H <ip_address> -o <OID> [-w warn_range] [-c crit_range]
[-C Community] [-s string] [-r regex] [-R regexi] [-t timeout] [-e retries]
[-l label] [-u units] [-p port-number] [-d delimiter] [-D-output delimiter]
[-m miblist] [-P snmp version] [-L seclevel] [-U secname] [-a authproto]
[-A Authpasswd] [-x privproto] [-X privpasswd]

Snmpwalk code:

snmpwalk AID-MIB 1 -v -c -m publicceragon 172.169.254.2 iso.3.6.1.2.1.25.1.1.0

return:
MIB search path: /root/.snmp/mibs:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Can not find module (AID-MIB): At line 0 in (none)
iso.3.6.1.2.1.25.1.1.0 = TimeTicks: (599,627,531) 69 days, 9: 37: 55.31

Re: check_snmp nagios

Posted: Wed Sep 23, 2015 5:10 pm
by tgriep
The check_snmp command options are not setup correctly.
Try this and see if this works for you.

Code: Select all

./check_snmp -H 172.169.254.2 -C publicceragon -o iso.3.6.1.4.1.2281.1.7.2.1 -m Aidu-MIB

Re: check_snmp nagios

Posted: Thu Sep 24, 2015 7:42 am
by alexprinou
Dear friend keeps giving error time limit port 161 using the check_snmp the nagios .
What can it be?

command:
/ usr / local / nagios / libexec / check_snmp -C publiceragon 172.16.254.2 -o iso.3.6.1.4.1.2281.1.7.2.1 -m Aidu -MIB

return:

External command error: Timeout: No Response from 172.16.254.2:161 .

Now on Linux snmpwalk works

command:
snmpwalk -v 1 -c publicceragon 172.16.254.2 iso.3.6.1.2.1.25.1.1.0 -m Aidu -MIB

return:

SNMPv2- SMI :: mib - 2.25.1.1.0 = TimeTicks : ( 605,559,529 ) 70 days , 2: 06: 35.29

Re: check_snmp nagios

Posted: Thu Sep 24, 2015 12:28 pm
by tgriep
I forgot the snmp version for the command. Try this and let us know if this works for you.

Code: Select all

./check_snmp -H 172.169.254.2 -C publicceragon -o iso.3.6.1.4.1.2281.1.7.2.1 -m Aidu-MIB -P 1

Re: check_snmp nagios

Posted: Thu Sep 24, 2015 12:57 pm
by alexprinou
Dear friend remains the error, how to solve this problem ?

nagios:/sites/html/velocimetro# /usr/local/nagios/libexec/check_snmp -C publiceragon -H 172.16.254.2 -o iso.3.6.1.4.1.2281.1.7.2.1 -m AIDU-MIB -P 1
External command error: Timeout: No Response from 172.16.254.2:161.
nagios:/sites/html/velocimetro#

Re: check_snmp nagios

Posted: Thu Sep 24, 2015 5:12 pm
by Box293
Let's try SNMP v2c

Code: Select all

/usr/local/nagios/libexec/check_snmp -C publiceragon -H 172.16.254.2 -o iso.3.6.1.4.1.2281.1.7.2.1 -m AIDU-MIB -P 2c

Re: check_snmp nagios

Posted: Fri Sep 25, 2015 7:10 am
by alexprinou
Hello , still the same error you forum has another tip ?

see the return of the command:

nagios / usr / local / nagios / libexec # / usr / local / nagios / libexec / check_snmp -C publiceragon -H 172.16.254.2 -o iso.3.6.1.4.1.2281.1.7.2.1 -m Aidu -MIB -P 2c
External command error: Timeout: No Response from 172.16.254.2:161 .
nagios / usr / local / nagios / libexec #

Re: check_snmp nagios

Posted: Fri Sep 25, 2015 9:21 am
by Box293
What happens when you do an SNMP walk?

Code: Select all

snmpwalk -v 2c -c publiceragon 172.16.254.2 -m all iso.3.6.1.4.1.2281.1.7.2.1

Re: check_snmp nagios

Posted: Fri Sep 25, 2015 12:49 pm
by alexprinou
Return the command


nagios: ~ # snmpwalk -v 2c -c publiceragon 172.16.254.2 -m all iso.3.6.1.4.1.2281.1.7.2.1
Unlinked OID in IPATM-IPMC-MIB: marsMIB :: = {mib-2 57}
Undefined identifier: mib-2 near line 18 of / usr / share / MIBs / ietf / IPATM-IPMC-MIB
Bad operator (INTEGER): At line 73 in / usr / share / MIBs / ietf / SNMPv2-PDU
Undefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2195 in / usr / share / MIBs / ietf / IPSEC-SPD-MIB
Undefined OBJECT-GROUP (diffServMultiFieldClfrNextFree): At line 2157 in / usr / share / MIBs / ietf / IPSEC-SPD-MIB
Undefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2062 in / usr / share / MIBs / ietf / IPSEC-SPD-MIB
Expected ":: =" (RFC5644): At line 493 in / usr / share / MIBs / iana / IANA-IPPM-METRICS-REGISTRY-MIB
Expected "{" (EOF): At line 651 in / usr / share / MIBs / iana / IANA-IPPM-METRICS-REGISTRY-MIB
Bad object identifier: At line 651 in / usr / share / MIBs / iana / IANA-IPPM-METRICS-REGISTRY-MIB
Bad parse of OBJECT-IDENTITY: At line 651 in / usr / share / MIBs / iana / IANA-IPPM-METRICS-REGISTRY-MIB
Timeout: No Response from 172.16.254.2
nagios: ~ #

Re: check_snmp nagios

Posted: Fri Sep 25, 2015 2:20 pm
by ssax
Usually when there is a timeout it's because of a firewall or because the community or snmp version is wrong. Have you checked the network/firewalls to see if it's being blocked anywhere?