From 80963d9652d7d70a56e59f20fa6919721f047426 Mon Sep 17 00:00:00 2001 From: Victor Robellini Date: Thu, 16 Apr 2020 10:53:55 -0400 Subject: [PATCH] https://forum.netgate.com/topic/152132/grafana-dashboard-using-telegraf-with-additional-plugins/20 Thanks to @JohnKap the response times in the gateway plugin (3.7) now work. The fix would most likely work witht he 2.7 script as well, but I don't have time to test at the moment. --- plugins/telegraf_gateways-3.7.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/telegraf_gateways-3.7.py b/plugins/telegraf_gateways-3.7.py index 293e450..3ffa4c6 100755 --- a/plugins/telegraf_gateways-3.7.py +++ b/plugins/telegraf_gateways-3.7.py @@ -16,6 +16,6 @@ for sock_name in glob.glob("dpinger*.sock"): s = sock.connect(sock_path) line = sock.recv(1024).decode().split('\n', 1)[0] values = line.split() - print("gateways,gateway_name="+values[0]+" rtt="+str(int(values[1])/100.0)+ \ - ",rttsd="+str(int(values[2])/100.0)+",loss="+str(int(values[3]))+"i") + print("gateways,gateway_name="+values[0]+" rtt="+str(int(values[1])/1.0)+ \ + ",rttsd="+str(int(values[2])/1.0)+",loss="+str(int(values[3]))+"i") sock.close()