dpinger Gateway latency via SNMP?
-
Is there any way to return the current dpinger Gateway Latency via SNMP?
I'd like to graph my gateway latency outside pfSense (Zabbix), but I'd rather not have to install a Zabbix Agent or Telegraf on my pfSense.
It would be VERY nice if the builtin SNMPD provided an OID to return the current Gateway latency. I can't locate it with a SNMPWALK, but given there are thousands of unexplained OID returned, it could still be there :-) -
@keyser Bump... Is that just impossible?
-
@keyser To my knowledge it is not exposed by default via SNMP.
Should be easy to add via extend if you are using net-snmp.
-
@keyser Here are a couple of net-snmp extend scripts as examples. The first is multi line, and the second is single line. Which to use depends upon how you want to parse on the other end. To me, multi line is simpler, but some people strongly prefer single line. To each their own.
Assuming that you name the extend "dpinger", you will find the OID at
NET-SNMP-EXTEND-MIB::nsExtendOutputFull."dpinger"
(.1.3.6.1.4.1.8072.1.3.2.3.1.2.7.100.112.105.110.103.101.114)Enjoy.
#!/bin/sh for file in /var/run/dpinger*.sock do cat $file | awk '{print "name:"$1",latency:"$2",stddev:"$3",loss:"$4}' done
#!/bin/sh for file in /var/run/dpinger*.sock do if [ "${result}" ] then result="${result}," fi new=`cat $file | awk '{print "{name:"$1",latency:"$2",stddev:"$3",loss:"$4"}" }'` result="${result}${new}" done echo "${result}"