]> git.ipfire.org Git - collecty.git/blobdiff - collecty-client
Split plugins into data sources and graph templates.
[collecty.git] / collecty-client
index 9251bf8e2f6fac12593fe0d021e6ab8f626cebd1..391f12969e2f4b7055ed9c2043d1e6ffa7d1a031 100755 (executable)
@@ -23,6 +23,9 @@ import collecty
 
 client = collecty.CollectyClient()
 
-for type in ("cpu", "entropy", "memory", "loadavg"):
-       for interval in ("day", "week", "year"):
-               client.graph(type, "%s-%s.png" % (type, interval), interval)
+for ds in client.data_sources:
+       for template in ds.templates:
+               t = template(ds)
+
+               for interval in ("-3h", "day", "week", "year"):
+                       t.graph("%s-%s.png" % (ds.id, interval), interval)