Skip to main content

Hello everyone, I have a problem with the speed test plugin. At first it worked fine, but then I got an error like Cannot read from socket: see the following command :

./centreon_monitoring_speedtest.pl --plugin=apps::monitoring::speedtest::plugin --mode=internet-bandwidth --debug
UNKNOWN: Cannot decode response
command response: {"type":"log","timestamp":"2025-05-30T15:03:21Z","message":"Error: [0] Cannot read from socket: ","level":"error"}
{"type":"result","timestamp":"2025-05-30T15:03:34Z","ping":{"jitter":4.089,"latency":4.224,"low":2.240,"high":10.530},"download":{"bandwidth":78769385,"bytes":392639680,"elapsed":5004,"latency":{"iqm":10.215,"low":3.573,"high":27.245,"jitter":2.973}},"upload":{"bandwidth":7694714,"bytes":47773864,"elapsed":6211,"latency":{"iqm":32.199,"low":11.669,"high":350.553,"jitter":15.463}},"packetLoss":0,"isp":"Orange Cote d'Ivoire","interface":{"internalIp":"10.XX.XX.XX","name":"ens160","macAddr":"00:50:56:8D:DE:E8","isVpn":false,"externalIp":"160.XX.XX.XX"},"server":{"id":45391,"host":"speedtest3.orange.ci","port":8080,"name":"ORANGE CI","location":"Bassam","country":"Côte d'Ivoire","ip":"154.68.49.138"},"result":{"id":"83346daa-39e4-41ea-904a-87b500f1c8d7","url":"https://www.speedtest.net/result/c/83346daa-39e4-41ea-904a-87b500f1c8d7
","persisted":true}} Could you help me?

Hello

I just tried and I couldn’t reproduce

if you run the speedtest command by itself, do you get an ok result?

 

the difference is I get a type=”result” and you get a “log” type

{
"type": "result",
"timestamp": "2025-06-02T12:00:02Z",
"ping": { "jitter": 0.028, "latency": 0.982, "low": 0.927, "high": 1.001 },
"download": {
"bandwidth": 118501776,
"bytes": 428943620,
"elapsed": 3615,
"latency": { "iqm": 9.443, "low": 1.432, "high": 15.214, "jitter": 1.944 }
},
"upload": {
"bandwidth": 100965834,
"bytes": 393349886,
"elapsed": 3902,
"latency": { "iqm": 13.476, "low": 3.439, "high": 17.103, "jitter": 0.825 }
},
"isp": "Orange",
"interface": {
"internalIp": "1....",
"name": "ens18",
"macAddr": "...",
"isVpn": false,
"externalIp": "8....."
},
"server": {
"id": 61289,
"host": "....c2d.liveservices.fr",
"port": 8080,
"name": "ORANGE FRANCE",
"location": "...",
"country": "France",
"ip": "...."
},
"result": {
"id": "ec79...",
"url": "https://www.speedtest.net/result/c/ec79...",
"persisted": true
}
}

 

you may need to open bug report on the github for that plugin

 

(I have a client in you country and there are a lot of internet issues, but your output says you had a successful test apparently, that’s  what strange)


merci c’est ok

./centreon_monitoring_speedtest.pl --plugin=apps::monitoring::speedtest::plugin --mode=internet-bandwidth --debug
OK: ping latency: 7.024 ms, jitter: 0.129 ms - download: 80.40 Mb/s, upload: 73.21 Mb/s | 'ping.latency.milliseconds'=7.024ms;;;0; 'ping.jitter.milliseconds'=0.129ms;;;0; 'internet.bandwidth.download.bitspersecond'=80399426b/s;;;0; 'internet.bandwidth.upload.bitspersecond'=73210060b/s;;;0;  cependant je n’arrive pas à la visualiser en mode graphique
 

 


have you ran the “speedtest” command as the user “centreon-engine”

if you didn’t, it will ask for the licence (as stated in the centreon plugin documentation)

and if you did it as root, it’s not accepted for the centreon-engine user (the user that run all checks)

 

if it doesn’t work, try adding --timeout option in the service macro

as it runs in command line, it may be a timeout issue and if it takes too long to run, then the command will timeout (and log no result, like you have on your screenshot : process timeout)

 

you can run in the shell "time ./centreon_monitoring_speedtest.pl --plugin=apps::monitoring::speedtest::plugin --mode=internet-bandwidth”

that will tell you how long the command took to run

 

add a few seconds, and add the setting in the service macro “EXTRAOPTIONS” like here (for example I put 60)

 

 


I followed the procedure but I still have the error.

 


Reply