Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    dpinger Gateway latency via SNMP?

    Scheduled Pinned Locked Moved SNMP
    4 Posts 2 Posters 1.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • keyserK
      keyser Rebel Alliance
      last edited by keyser

      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 :-)

      Love the no fuss of using the official appliances :-)

      keyserK 1 Reply Last reply Reply Quote 0
      • keyserK
        keyser Rebel Alliance @keyser
        last edited by

        @keyser Bump... Is that just impossible?

        Love the no fuss of using the official appliances :-)

        dennypageD 2 Replies Last reply Reply Quote 0
        • dennypageD
          dennypage @keyser
          last edited by

          @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.

          1 Reply Last reply Reply Quote 1
          • dennypageD
            dennypage @keyser
            last edited by

            @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}"
            
            1 Reply Last reply Reply Quote 1
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.