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

    Can Telegraf package gather latency/packet loss information?

    Scheduled Pinned Locked Moved Traffic Monitoring
    3 Posts 2 Posters 3.4k 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.
    • V
      victorhooi
      last edited by victorhooi

      In pfSense, you can go to the Status, Monitoring page, and generate a pretty graph showing pocket loss, latency etc.

      alt text

      I just setup Telegraf on my XG-7100, and it's displaying some basic information like throughput in InfluxDB. However I don't see any latency/packet loss info?

      1 Reply Last reply Reply Quote 0
      • V
        victorhooi
        last edited by

        To answer myself - the "ping" plugin in Telegraf can collect similar data, and output to things like InfluxDB (or other databases).

        However, the Telegraf package is currently x86 only on pfSense - ARM builds are broken for pfSense:

        https://github.com/pfsense/FreeBSD-ports/pull/627

        1 Reply Last reply Reply Quote 0
        • F
          fastjack42
          last edited by

          Yes, Telegraf can do this. It can use the same data as gathered by dpinger and displayed in the graph in your first post.

          First you need a script, that will gather this data from dpinger and output it in a format that Telegraf will be able to digest. I made a python script some time ago. You can find it here: https://gist.github.com/fastjack/a0feb792a9655da7aa3e2a7a1d9f812f. Copy that script to /usr/local/bin and make it executable.

          Second you need to tell Telegraf to call that script. For this you'll need to add this to your telegraf.conf:

          [[inputs.exec]]
                  commands = ["/usr/local/bin/gateways.py"]
                  timeout = "5s"
                  data_format = "influx"
          

          Finally restart Telegraf so it will pick up the changed config.

          Please note that any changes you make in the pfSense web UI in Services > Telegraf will recreate the telegraf.conf from scratch and clobber your modifications.

          1 Reply Last reply Reply Quote 1
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.