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 :

NET-SNMP-EXTEND-MIB::nsExtendOutputFull."zfs-arcstat"

“zfs-arcstat” is a free to chose 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\"
.1.3.6.1.4.1.8072.1.3.2.3.1.2.11.122.102.115.45.97.114.99.115.116.97.116

The opposite is also possible, without any flags :

# snmptranslate .1.3.6.1.2.1.1.3.0
SNMPv2-MIB::sysUpTime.0

It was in the snmp docs all along.

Well perhaps writing this post will help me remember;