• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.6k 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.
  • K
    keyser Rebel Alliance
    last edited by keyser Jan 7, 2023, 5:36 PM Jan 7, 2023, 5:33 PM

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

    K 1 Reply Last reply Feb 7, 2023, 3:07 PM Reply Quote 0
    • K
      keyser Rebel Alliance @keyser
      last edited by Feb 7, 2023, 3:07 PM

      @keyser Bump... Is that just impossible?

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

      D 2 Replies Last reply Feb 8, 2023, 2:31 AM Reply Quote 0
      • D
        dennypage @keyser
        last edited by Feb 8, 2023, 2:31 AM

        @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
        • D
          dennypage @keyser
          last edited by Feb 8, 2023, 7:09 AM

          @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.
            This community forum collects and processes your personal information.
            consent.not_received