Can Telegraf package gather latency/packet loss information?

  • 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?

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

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

            commands = ["/usr/local/bin/"]
            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.

Log in to reply