SNMP Get last entry

#1

Hello there !

I’ve a global question about snmp. Is it possible to get the last entry of a specific table with a snmpget ?

I’ve a table in which event logs are added. So I’d like to get the last entry.

Is it even possible to do so in snmp ?

Regards

#2

snmpget requires a specific oid. If you have that you’ll get the entry. Otherwise you can run an snmpwalk to get the last entry.

#3

That’s what I was afraid of …
It would be perfect if a cmd exists that get the last entry, like “snmpgetlast” :smiley:

With snmpwalk I’ll get all entries, but I only need the last one. So my result can’t be really used with cehck_snmp.

#4

snmpwalk ... | tail -1 | ...