May 4, 2017

SNMP OID to Text

Posted on May 4, 2017  •  1 minutes  • 125 words  •  Suggest Changes

I have been searching high and low for this, and it’s not even the first time. Since my brain did not store this long term; I’m sharing it here.

When extending snmpd like this : (in /etc/snmp/snmpd.conf)

extend zfs-arcstat /usr/bin/cat /proc/spl/kstat/zfs/arcstats

The output can be queried using :


“zfs-arcstat” is a free to choose name. My search, is how can you represent this free name in a single numeric OID;  This can be done using snmptranslate, with the flags -0n.

Take note that one has to escape the quotes.

# snmptranslate -On NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"zfs-arcstat\"

The opposite is also possible, without any flags :

# snmptranslate .

It was in the snmp docs all along.

Well perhaps writing this post will help me remember;


If you enjoyed this website, consider buying me a Dr. Pepper

Buy me a Dr PepperBuy me a Dr Pepper