Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_speedtest-cli
1.2
2017-12-20
- Nagios 3.x
- Nagios 4.x
@jonwitts
GPL
54793
File | Description |
---|---|
check_speedtest-cli.sh | check_speedtest-cli.sh |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
You need to have installed speedtest-cli on your system first and ensured that it is
working by calling "speedtest --simple".
See here: https://github.com/sivel/speedtest-cli for info about speedtest-cli
Please see the help from the script for more details.
Any issues, please report them on the GitHub page: https://github.com/jonwitts/nagios-speedtest/issues
Reviews (9)
byTheITguy21, March 18, 2023
speedtest-cli dos'nt work anymore as Ookla decommissionned the server lists urls. The new url is https://www.speedtest.net/api/js/servers and is json formatted.
I released on Nagios Exchange a new Nagios plugin "check_speedtest" based on this excellent legacy check_speedtest-cli by Jon Witts, which now work with genuine "speedtest" cli bby Ookla, no need to use speedtest-cli anymore. Check it out !
I released on Nagios Exchange a new Nagios plugin "check_speedtest" based on this excellent legacy check_speedtest-cli by Jon Witts, which now work with genuine "speedtest" cli bby Ookla, no need to use speedtest-cli anymore. Check it out !
byJVD, July 5, 2021
1 of 1 people found this review helpful
I installed this script and it works, i get the ping, upload & download speed. So far so good!
But it has no graph, is there a way to activate the graph in Nagios? All other plugins show a graph.
But it has no graph, is there a way to activate the graph in Nagios? All other plugins show a graph.
bywpyung, April 27, 2021
I am using this via the docker container https://hub.docker.com/r/martinjohn/nagios
just hit this problem whereby the script nolonger works
https://unix.stackexchange.com/questions/644442/speedtest-cli-valueerror-invalid-literal-for-int-with-base-10
so I did the wget of speedtest.py to /opt/Custom-Nagios-Plugins
and also had to modify STb in check_speedtest-cli.sh
and copy in the file speedtest
would be nice if someone could update the docker container
Peter
just hit this problem whereby the script nolonger works
https://unix.stackexchange.com/questions/644442/speedtest-cli-valueerror-invalid-literal-for-int-with-base-10
so I did the wget of speedtest.py to /opt/Custom-Nagios-Plugins
and also had to modify STb in check_speedtest-cli.sh
and copy in the file speedtest
would be nice if someone could update the docker container
Peter
bybige40wings, October 28, 2020
I know it's a bit outdated, but thank you for submitting this!
It looks like a recent upgrade made it a requirement to specify a single server to use for the speed test. When using an internal server, this makes sense. But when doing an external speed test, I found that limiting to a single server is problematic, and was creating false alarms in Nagios when that particular server went down.
I was able to tweak the script so the $SEs argument is required only if $Loc is set to 'i'.
And updated the speedtest commands accordingly:
if [ -z $SEs ]; then
echo "No specific server defined"
command=$($STb/speedtest --simple)
else
command=$($STb/speedtest --server=$SEs --simple)
fi
It looks like a recent upgrade made it a requirement to specify a single server to use for the speed test. When using an internal server, this makes sense. But when doing an external speed test, I found that limiting to a single server is problematic, and was creating false alarms in Nagios when that particular server went down.
I was able to tweak the script so the $SEs argument is required only if $Loc is set to 'i'.
And updated the speedtest commands accordingly:
if [ -z $SEs ]; then
echo "No specific server defined"
command=$($STb/speedtest --simple)
else
command=$($STb/speedtest --server=$SEs --simple)
fi
byytaborda17, November 30, 2017
I used the manual installation in my CentOS server, downloaded the file, give permissions to execution, but then I had two issues, the first one in line 170 you need to add the path to the python script: STb="/usr/local/bin" the check tells you that, but then, depending on your installation, you may need to change the command in line 275 adn 280, in my case I had to change this:
$($STb/speedtest --server=$SEs --simple)
with this:
$($STb/speedtest-cli --server=$SEs --simple)
From there on, the check works beautibully.
Thanks Jon Witts!
$($STb/speedtest --server=$SEs --simple)
with this:
$($STb/speedtest-cli --server=$SEs --simple)
From there on, the check works beautibully.
Thanks Jon Witts!
byTrollFarmer, January 4, 2017
The script works very wel. There is only one point you should change.
The comparison in the IF statements will not work optimal. I had to change the If statements to something like this:
if [ $(echo $upload '
The comparison in the IF statements will not work optimal. I had to change the If statements to something like this:
if [ $(echo $upload '
byJedimaster0, December 16, 2016
You do job good.
Would be much better if "server" option would be added!
Owner's reply
Hi Siggi,
I have included your suggested changes into version 1.1 of the script. Please update to the latest version!
Thanks for your suggestions,
Jon
byelpatron, January 27, 2014
1 of 1 people found this review helpful
Easy to install und use, clean performace data, tested with Nagios 4.0.2 and PNP 0.6.21 (Debian wheezy).
Unfortunately, ping response times from speedtest-cli.sh seem to be much too big (by the factor of 10)?
Unfortunately, ping response times from speedtest-cli.sh seem to be much too big (by the factor of 10)?
Owner's reply
Hi elpatron,
Thanks for the review.
My script is not processing the ping results as such; other than displaying what the speedtest-cli python script is returning. I have had a quick look on their site and found this:
https://github.com/sivel/speedtest-cli/issues/58#issuecomment-41664906
Jon