check_snmp nagios

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.
alexprinou
Posts: 23
Joined: Sat Apr 18, 2015 9:06 am

check_snmp nagios

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp nagios

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
alexprinou
Posts: 23
Joined: Sat Apr 18, 2015 9:06 am

Re: check_snmp nagios

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp nagios

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
alexprinou
Posts: 23
Joined: Sat Apr 18, 2015 9:06 am

Re: check_snmp nagios

Post 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#
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_snmp nagios

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
alexprinou
Posts: 23
Joined: Sat Apr 18, 2015 9:06 am

Re: check_snmp nagios

Post 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 #
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_snmp nagios

Post 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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
alexprinou
Posts: 23
Joined: Sat Apr 18, 2015 9:06 am

Re: check_snmp nagios

Post 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: ~ #
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: check_snmp nagios

Post 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?
Locked