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\" .184.108.40.206.4.1.8072.1.3.2.220.127.116.11.18.104.22.168.22.214.171.124.116.97.116
The opposite is also possible, without any flags :
# snmptranslate .126.96.36.199.188.8.131.52.0 SNMPv2-MIB::sysUpTime.0
It was in the snmp docs all along.
Well perhaps writing this post will help me remember;