Snmp custom oid /service don't work , but in cli works

Hello i need to store a custom oid from ups (watt)
oid is = .1.3.6.1.4.1.3808.1.1.1.4.2.5
so i add custom oid
but value is always 0
so i check on cli (rocky linux) and try to run

snmpwalk -Oqv -r 1 -t 10 -v 1 -c public 172.17.143.224:161 .1.3.6.1.4.1.3808.1.1.1.4.2.5
and i see 108 (correct value)

instead to use custom oid i try to config services
add service snmp
Check Type = snmp
remote host = 172.17.143.224
parameters = -P 1 -C public -H 172.17.143.224 -p 161 -o .1.3.6.1.4.1.3808.1.1.1.4.2.5

but after some minutes…
External command error: Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.4.1.3808.1.1.1.4.2.5

why ny cli work?

can use a service to execute a script?
snmpwalk -Oqv -r 1 -t 10 -v 1 -c public 172.17.143.224:161 .1.3.6.1.4.1.3808.1.1.1.4.2.5

so i pool correct value …
thank you

solved…
i changed
oid = .1.3.6.1.4.1.3808.1.1.1.4.2.5.0

thank you

Just to clarify that is because the check uses snmpget instead of snmpwalk.

snmpwalk will get all the oids that start with the given oid (including .0)

snmpget requires the exact oid (which ends in .0 in your case and usually ends in .0 for scalar values)

big thank you to clarify :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.