i m using nagios for monitoring routers installed on a centos 6.4
i want to snmpwalk (v3) the router and I receive some error:
No log handling enabled - turning on stderr logging
snmpwalk: USM generic error
it seems to be something with the mib as I searched the net but i have no info about it
is there anyone who can find a solution for this?
snmpwalk v3 error in nagios for router snmp parameters
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmpwalk v3 error in nagios for router snmp parameters
What particular command are you running to do an snmpwalk? What device make and model are you trying to scan? Also let's do an nmap to be sure that snmp is open to the nagios machine.
Code: Select all
nmap -sU -p 161 [IP of switch\router]Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Re: snmpwalk v3 error in nagios for router snmp parameters
What was the full snmpwalk command you used? SNMP v3 Auth can be tricky.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: snmpwalk v3 error in nagios for router snmp parameters
thanks guys.
I got the MIB file with snmp v2 since it was easier,
but it did not gave me a string for the ports to monitor the status of them.
i studied the manual in this link http://nagios.sourceforge.net/docs/nagi ... uters.html
which says to use this config :
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Port 1 Link Status
check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
}
In the example above, the "-o ifOperStatus.1" refers to the OID for the operational status of port 1 on the switch.
but my collected info is like this :
IF-MIB::ifOperStatus.1030 = INTEGER: down(2)
IF-MIB::ifOperStatus.1158 = INTEGER: down(2)
IF-MIB::ifOperStatus.1286 = INTEGER: down(2)
IF-MIB::ifOperStatus.1409 = INTEGER: up(1)
IF-MIB::ifOperStatus.1537 = INTEGER: up(1)
IF-MIB::ifOperStatus.1666 = INTEGER: down(2)
IF-MIB::ifOperStatus.1794 = INTEGER: down(2)
IF-MIB::ifOperStatus.1922 = INTEGER: down(2)
IF-MIB::ifOperStatus.2050 = INTEGER: down(2)
IF-MIB::ifOperStatus.2178 = INTEGER: down(2)
IF-MIB::ifOperStatus.2306 = INTEGER: down(2)
IF-MIB::ifOperStatus.2434 = INTEGER: down(2)
IF-MIB::ifOperStatus.2562 = INTEGER: down(2)
and there is nothing as a string in it.
so how am i suppose to get the OID from?
I got the MIB file with snmp v2 since it was easier,
but it did not gave me a string for the ports to monitor the status of them.
i studied the manual in this link http://nagios.sourceforge.net/docs/nagi ... uters.html
which says to use this config :
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Port 1 Link Status
check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
}
In the example above, the "-o ifOperStatus.1" refers to the OID for the operational status of port 1 on the switch.
but my collected info is like this :
IF-MIB::ifOperStatus.1030 = INTEGER: down(2)
IF-MIB::ifOperStatus.1158 = INTEGER: down(2)
IF-MIB::ifOperStatus.1286 = INTEGER: down(2)
IF-MIB::ifOperStatus.1409 = INTEGER: up(1)
IF-MIB::ifOperStatus.1537 = INTEGER: up(1)
IF-MIB::ifOperStatus.1666 = INTEGER: down(2)
IF-MIB::ifOperStatus.1794 = INTEGER: down(2)
IF-MIB::ifOperStatus.1922 = INTEGER: down(2)
IF-MIB::ifOperStatus.2050 = INTEGER: down(2)
IF-MIB::ifOperStatus.2178 = INTEGER: down(2)
IF-MIB::ifOperStatus.2306 = INTEGER: down(2)
IF-MIB::ifOperStatus.2434 = INTEGER: down(2)
IF-MIB::ifOperStatus.2562 = INTEGER: down(2)
and there is nothing as a string in it.
so how am i suppose to get the OID from?
Re: snmpwalk v3 error in nagios for router snmp parameters
The string to check would be the end of the return: up(1) or down(2)barry1946 wrote:and there is nothing as a string in it.
Additionally, you could just check the integer instead of the string. I am unsure why your device is listing the port IDs in the thousands. You may want to contact the vendor for clarification.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: snmpwalk v3 error in nagios for router snmp parameters
this is a Huawei router which returns the value like this.
i found a page on the internet which tells to use this OID :
!.1.3.6.1.2.1.2.2.1.8.X!-r 1!-l ifOperStatus
replacing the X at the end with the thousand values!!!
but I need to achieve the OIDs for whatever I want , do you know a way for this?
i found a page on the internet which tells to use this OID :
!.1.3.6.1.2.1.2.2.1.8.X!-r 1!-l ifOperStatus
replacing the X at the end with the thousand values!!!
but I need to achieve the OIDs for whatever I want , do you know a way for this?
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmpwalk v3 error in nagios for router snmp parameters
Let's start by going back to your snmpwalk and get the identifier for each port:
Code: Select all
snmpwalk -c public -v 2v linksys-srw224p .1.3.6.1.2.1.2.2.1.8Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.