Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apps::monitoring::speedtest::plugin --mode=internet-bandwidth: UNKNOWN: Cannot decode response #5078

Open
joschi99 opened this issue Jun 24, 2024 · 1 comment

Comments

@joschi99
Copy link
Contributor

Latest plugins

centreon_plugins.pl --plugin=apps::monitoring::speedtest::plugin --mode=internet-bandwidth --warning-ping-latency=200 --warning-bandwidth-download= --warning-bandwidth-upload= --critical-ping-latency=500 --critical-bandwidth-download= --critical-bandwidth-upload= --warning-ping-jitter=10 --critical-ping-jitter=25 --debug
UNKNOWN: Cannot decode response
command response: {"type":"log","timestamp":"2024-06-24T04:39:28Z","message":"Error: [0] Cannot read from socket (0 bytes read)","level":"error"}
{"type":"result","timestamp":"2024-06-24T04:39:45Z","ping":{"jitter":0.389,"latency":10.697,"low":10.538,"high":11.315},"download":{"bandwidth":117303336,"bytes":1084639440,"elapsed":9408,"latency":{"iqm":25.887,"low":10.500,"high":34.739,"jitter":0.731}},"upload":{"bandwidth":88999241,"bytes":646122593,"elapsed":7305,"latency":{"iqm":11.246,"low":10.687,"high":12.817,"jitter":0.433}},"packetLoss":0,"isp":"Fastweb","interface":{"internalIp":"192.168.15.35","name":"ens192","macAddr":"00:50:56:84:85:BC","isVpn":false,"externalIp":"151.0.132.229"},"server":{"id":6339,"host":"speedtest.3psystem.net","port":8080,"name":"Connetical Srl","location":"Padova","country":"Italy","ip":"185.44.215.252"},"result":{"id":"c78729de-117a-46c7-88ad-5895d3e82e45","url":"https://www.speedtest.net/result/c/c78729de-117a-46c7-88ad-5895d3e82e45","persisted":true}}

If we launch the speedtest manualy we will have this output:

 speedtest

   Speedtest by Ookla

[error] Error: [0] Cannot read from socket:
      Server: FlyNet.it - Padova (id: 55688)
         ISP: Fastweb
Idle Latency:    10.90 ms   (jitter: 0.16ms, low: 10.75ms, high: 11.10ms)
    Download:   753.48 Mbps (data used: 1.4 GB)
                 23.94 ms   (jitter: 5.02ms, low: 9.94ms, high: 281.33ms)
      Upload:   711.06 Mbps (data used: 365.6 MB)
                 10.66 ms   (jitter: 2.41ms, low: 10.18ms, high: 80.35ms)
 Packet Loss:     0.7%
  Result URL: https://www.speedtest.net/result/c/81df0fd4-040c-473e-a3fd-144b8310fd2a

As you can see the speedtest by self is working but we have the exception [error] Error: [0] Cannot read from socket: wich probably will cause the problem. Could you ignore this exception in the plugin?

@lucie-dubrunfaut
Copy link
Contributor

Hello :)

According to my research, it seems that the error management is not internal to the plugin itself but managed by the JSON::XS library and it is when it returns an error when decoding a JSON that the plugin returns the output Cannot decode response. It should therefore be possible to offer filtering on certain error(s) via an option. For this it would be necessary to generate test data in your conditions on which we could work to implement this option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants