]> git.ipfire.org Git - oddments/collecty.git/blobdiff - collecty/plugins/base.py
Fix stepsize/heartbeat when creating RRDs.
[oddments/collecty.git] / collecty / plugins / base.py
index 183c2bf14940202c6dd7bb257207f84efb1b4a44..188c6575165497633eeec3f54a69de501b60852f 100644 (file)
@@ -139,6 +139,10 @@ class DataSource(threading.Thread):
        def stepsize(self):
                return self.interval
 
+       @property
+       def heartbeat(self):
+               return self.stepsize * 2
+
        @property
        def file(self):
                """
@@ -180,7 +184,7 @@ class DataSource(threading.Thread):
                                                prefix,
                                                name,
                                                type,
-                                               "%s" % self.stepsize,
+                                               "%s" % self.heartbeat,
                                                lower_limit,
                                                upper_limit
                                        ))