Skip to main content

How Speed Test works

We already have the script installed, now we are going to see how it works to understand and learn more about how Pandora FMS works. When you run the installer, the /root/bin folder is created (in case it does not exist), inside this folder we will find several scripts:

image-1604322344832.png

The pandora_agent.conf file (it is the initial version created by the script when installing), regarding the operation of the Speed Test tool, the client in Python is used which is the speedtest-cli file, so that the metrics can be taken, a scheduled task is created that executes the script /bin/speedtest.sh which is executed once every half hour, you can validate it with the command 

crontab -l

image-1604322553252.png

It generates a file speedtest.log, where the PandoraFMS agent takes the metrics

image-1604322608558.png

The scripts speedtest_upload.sh and speedtest_download.sh are the ones that take the values to be able to add them in Pandora FMS:


image- 1604322701348.png

To finish the lines corresponding to the internet speed tests in our configuration file pandora_agent.conf are the following:


# SpeedTest Download
module_begin
module_name SpeedTestDownload
module_type generic_data
module_description Speedtest Download
module_exec /root/bin/speedtest_download.sh
module_group Networking
module_end

# Ping SpeedTest Upload
module_begin
module_name SpeedTestUpload
module_type generic_data
module_description Speedtest Upload
module_exec /root/bin/speedtest_upload.sh
module_group Networking
module_end