]> git.ipfire.org Git - collecty.git/commitdiff
latency: Ping 10 times within 10 seconds
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Sep 2020 15:03:27 +0000 (15:03 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 21 Sep 2020 15:03:27 +0000 (15:03 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/collecty/plugins/latency.py

index 388413d93d0d5fc09de4088d26b1cb8bb7c479d9..2b7d8d0748f35ce17b1a1d3faebe23c9dd0a89b9 100644 (file)
@@ -136,9 +136,6 @@ class LatencyObject(base.Object):
                "DS:loss4:GAUGE:0:100",
        ]
 
-       def __repr__(self):
-               return "<%s %s>" % (self.__class__.__name__, self.hostname)
-
        def init(self, hostname):
                self.hostname = hostname
 
@@ -152,7 +149,7 @@ class LatencyObject(base.Object):
                for family in (socket.AF_INET6, socket.AF_INET):
                        try:
                                p = _collecty.Ping(self.hostname, family=family)
-                               p.ping(count=5, deadline=10)
+                               p.ping(count=10, deadline=10)
 
                                result += (p.average, p.stddev, p.loss)