Speedtest Plugin

Tags: #<Tag:0x00007fdb8341b520>

Dear all,

I created a Speedtest plugin that can be used to graph internet bandwidth. I had a need for this feature after we had some internet uplink shaping issues. I decided to properly release my code.

It’s not perfect, but it does the job :slight_smile:

Let me know what you think:
Jack Greyhat / LibreNMS Speedtest · GitLab

Suggestions are welcome!
Thanks!

4 Likes

that’s really cool - I need to try it out. Thank you for sharing!

Just an idea. Have the ability for multiple speedtest servers. That way we could install a remote polling server with speedtest at remote sites.

1 Like

Thank you @jackgreyhat great plugin and really good instructions for installation.

Excellent idea @Wolfraider.
Just swapped over to this from another speedtest plugin and the display is much better.
A way of running this at each location that’s monitored would be amazing.

Regards

Hi, I just installed your plugin but it isn’t graphing in Librenms. It is enabled, UI is there, after running /opt/librenms/html/plugins/Speedtest/librenms-speedtest.sh run && /opt/librenms/html/plugins/Speedtest/librenms-speedtest.sh graph, speedtest-bandwidth.rrd and speedtest-latency.rrd are created in /opt/librenms/html/plugins/Speedtest/rrd, speedtest-server and speedtest-results are created in /opt/librenms/html/plugins/Speedtest/tmp. Is there something I should look for to trouble shoot this?

Hi,

I have the same issue as many others according to Gitlab, Graphs are not being created. I tried to run it bash -x but rrdtool cannot find any PNG as it is not being created.:

rrdtool graph /opt/librenms/html/plugins/Speedtest/png/speedtest-latency-day.png -J -a PNG --start -1day '--title=Last Day' --vertical-label ms DEF:P=/opt/librenms/html/plugins/Speedtest/rrd/speedtest-latency.rrd:LATENCY:AVERAGE DEF:PMIN=/opt/librenms/html/plugins/Speedtest/rrd/speedtest-latency.rrd:LATENCY:MIN DEF:PMAX=/opt/librenms/html/plugins/Speedtest/rrd/speedtest-latency.rrd:LATENCY:MAX VDEF:Pavg=P,AVERAGE 'LINE1:Pavg#cc3300:Avg \n' 'LINE2:P#3d61ab:Last latency (ms)\n' 'GPRINT:Pavg:Avg latency %2.1lf ms\n' -h 500 -w 1000 -y1:2 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal -c FONT#000000 --font LEGEND:8:DejaVuSansMono --font AXIS:7:DejaVuSansMono

This is the verbose output for the rrdtool command:
ERROR: the RRD does not contain an RRA matching the chosen CF

Probably found it… You create an png based on MIN / MAX / AVERAGE but these are not being set. When you fetch the rrd using rrdtool you only get AVERAGE back:

When changing the rrdtool command to this it works:
rrdtool graph /opt/librenms/html/plugins/Speedtest/png/speedtest-latency-day.png -J -a PNG --start -1day '--title=Last Day' --vertical-label ms DEF:P=/opt/librenms/html/plugins/Speedtest/rrd/speedtest-latency.rrd:LATENCY:AVERAGE DEF:PMIN=/opt/librenms/html/plugins/Speedtest/rrd/speedtest-latency.rrd:LATENCY:AVERAGE DEF:PMAX=/opt/librenms/html/plugins/Speedtest/rrd/speedtest-latency.rrd:LATENCY:AVERAGE VDEF:Pavg=P,AVERAGE 'LINE1:Pavg#cc3300:Avg \n' 'LINE2:P#3d61ab:Last latency (ms)\n' 'GPRINT:Pavg:Avg latency %2.1lf ms\n' -h 500 -w 1000 -y1:2 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal -c FONT#000000 --font LEGEND:8:DejaVuSansMono --font AXIS:7:DejaVuSansMono

But it shows only average, no min or max, these values are not set by the bash script.