diff options
author | Stef Walter <stef@memberwebs.com> | 2006-01-20 23:10:33 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2006-01-20 23:10:33 +0000 |
commit | 9a813d3324c2dae32fcfd690591a9e31cdad649d (patch) | |
tree | 2b96e4e2008143f261721187293c2b517285400a /tools/rrdui-create.py |
Initial import
Diffstat (limited to 'tools/rrdui-create.py')
-rw-r--r-- | tools/rrdui-create.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/rrdui-create.py b/tools/rrdui-create.py new file mode 100644 index 0000000..3b46021 --- /dev/null +++ b/tools/rrdui-create.py @@ -0,0 +1,28 @@ +#!/usr/bin/python + +import os, sys +import rrdtool + +from rrdui import * + +def createItems(graphs): + + for item in graphs: + if os.path.exists(item.filedata): + continue + + args = [item.filedata, "-b-1y", "-s10"] + + # The creation info + (fields, rras) = item.getCreateInfo() + + # Flesh it out properly, and add it + args.extend(["RRA:%s" % r for r in rras]) + args.extend(["DS:%s:%s" % (f, fields[f]) for f in fields.keys()]) + + # And create it + rrdtool.create(*args) + +# Basics +graphs = loadGraphs() +createItems(graphs) |