I'm having trouble calling check_snmp with multiple OIDs. Tested with 1.14.16 and 2.0.3.
It works with some OIDs, but not others.
combo of syName & sysDescr works fine.
check_snmp -P 2c -H XXXX -C XXXX -o .1.3.6.1.2.1.1.5.0 -o .1.3.6.1.2.1.1.1.0 -l sysName -l sysDescr
SNMP OK - sysName "xBalancer1" sysDescr "xBalancer" |
Then there's these two OIDs, IF-MIB::ifOutOctets, and IF-MIB::ifInOctets, which work on their own.
check_snmp -P 2c -H XXXX -C XXXX -o .1.3.6.1.2.1.2.2.1.16.1
SNMP OK - 3234859200 | iso.3.6.1.2.1.2.2.1.16.1=3234859200c
check_snmp -P 2c -H XXXX -C XXXX -o .1.3.6.1.2.1.2.2.1.10.1
SNMP OK - 15737717 | iso.3.6.1.2.1.2.2.1.10.1=15737717c
But when I try to get those same two OIDs in one call, it fails.
check_snmp -P 2c -H XXXX -C XXXX -o .1.3.6.1.2.1.2.2.1.16.1 -o .1.3.6.1.2.1.2.2.1.10.1
External command error: Error in packet
Reason: (genError) A general failure occured
Failed object: iso.3.6.1.2.1.2.2.1.10.1
check_snmp with multiple OIDs failing
Re: check_snmp with multiple OIDs failing
Odd. Using 2.0.3, I can check multiple oids:
Can you try running the check in verbose mode and post the output?
Code: Select all
[root@nagiosxi libexec]# ./check_snmp -H <ip> -C <community> -v 1 -o .1.3.6.1.2.1.2.2.1.16.1 -o .1.3.6.1.2.1.2.2.1.10.1
SNMP OK - 0 0 | iso.3.6.1.2.1.2.2.1.16.1=0c iso.3.6.1.2.1.2.2.1.10.1=0c
Code: Select all
check_snmp -P 2c -H XXXX -C XXXX -o .1.3.6.1.2.1.2.2.1.16.1 -o .1.3.6.1.2.1.2.2.1.10.1 -vvv
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: check_snmp with multiple OIDs failing
Must be something broken in the SNMP implementation of the device type I'm trying to poll then.
Thanks for the sanity check.
Thanks for the sanity check.
Re: check_snmp with multiple OIDs failing
Fair enough, though verbose mode (-vvv) may shed some light on the "why?".
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.
- Bryan Quesada
- Posts: 6
- Joined: Wed Nov 05, 2014 10:23 am
- Location: Costa Rica
- Contact:
Re: check_snmp with multiple OIDs failing
check_snmp with multiple OIDs. Is simple only is executed as follows
./check_snmp -H 1x.x.x.x -C name -o .1.3.6.1.4.1.13045.1.1.2.2.1.4.3,.1.3.6.1.4.1.13045.1.1.2.2.1.4.1 -w 24,40 -c 40,42 -l "Temperature,Humidity"
OUTPUT:
Temperature CRITICAL - Temperature 22 Humidity *43* | Temperature=22;0:24;0:40 Humidity=43;0:40;0:42
./check_snmp -H 1x.x.x.x -C name -o .1.3.6.1.4.1.13045.1.1.2.2.1.4.3,.1.3.6.1.4.1.13045.1.1.2.2.1.4.1 -w 24,40 -c 40,42 -l "Temperature,Humidity"
OUTPUT:
Temperature CRITICAL - Temperature 22 Humidity *43* | Temperature=22;0:24;0:40 Humidity=43;0:40;0:42
Re: check_snmp with multiple OIDs failing
Yeah, though I think OP's problem is related to an snmp device with an odd snmp implementation.
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.
- Bryan Quesada
- Posts: 6
- Joined: Wed Nov 05, 2014 10:23 am
- Location: Costa Rica
- Contact:
Re: check_snmp with multiple OIDs failing
You can test if the device returns data using snmpwalk.
Temperature
# snmpwalk -c name x.x.x.x -On .1.3.6.1.4.1.13045.1.1.2.2.1.4.3 -v1
.1.3.6.1.4.1.13045.1.1.2.2.1.4.3 = INTEGER: 22
Humidity
# snmpwalk -c name x.x.x.x -On .1.3.6.1.4.1.13045.1.1.2.2.1.4.1 -v1
.1.3.6.1.4.1.13045.1.1.2.2.1.4.1 = INTEGER: 45
The above command return data(INTEGER: 22, INTEGER: 45), we can say that the device returns information using snmp agent
Temperature
# snmpwalk -c name x.x.x.x -On .1.3.6.1.4.1.13045.1.1.2.2.1.4.3 -v1
.1.3.6.1.4.1.13045.1.1.2.2.1.4.3 = INTEGER: 22
Humidity
# snmpwalk -c name x.x.x.x -On .1.3.6.1.4.1.13045.1.1.2.2.1.4.1 -v1
.1.3.6.1.4.1.13045.1.1.2.2.1.4.1 = INTEGER: 45
The above command return data(INTEGER: 22, INTEGER: 45), we can say that the device returns information using snmp agent
Re: check_snmp with multiple OIDs failing
OP: Do you need any more help, or should we lock this thread?
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.