path: root/rrdtool-model.lua
diff options
authorMika Havela <>2009-07-02 15:41:59 +0000
committerMika Havela <>2009-07-02 15:41:59 +0000
commitbc9c06910c0544c3f3029db287beda85afa2b542 (patch)
tree17ddbfe5d64c403b2c360c2e4cf67d0aad6b80a6 /rrdtool-model.lua
parentccda03f6238def938e63e4ccd81c79aed9e2bb88 (diff)
Started on 'create new rrd' function (still much to do).
The viewfile for NewRRD is showing some forms, but it's still not usable.
Diffstat (limited to 'rrdtool-model.lua')
1 files changed, 11 insertions, 0 deletions
diff --git a/rrdtool-model.lua b/rrdtool-model.lua
index 1cc032f..9e9295f 100644
--- a/rrdtool-model.lua
+++ b/rrdtool-model.lua
@@ -91,3 +91,14 @@ end
function getrrdlist()
return list_files(databases)
+function createnewrrd()
+ local newdb = {}
+ = cfe({label="Name",value="mydb.rrd",descr="The name of the RRD you want to create. RRD files should end with the extension .rrd. However, RRDtool will accept any filename."})
+ newdb.start = cfe({label="Start",value="",descr="Specifies the time in seconds since 1970-01-01 UTC when the first value should be added to the RRD. RRDtool will not accept any data timed before or at the time specified."})
+ newdb.step = cfe({label="Step",value="",descr="Specifies the base interval in seconds with which data will be fed into the RRD."})
+ newdb.ds = cfe({label="Data stores",value="",descr="DS:ds-name:GAUGE | COUNTER | DERIVE | ABSOLUTE:heartbeat:min:max \
+ newdb.rra = cfe({label="Round Robin Archive",value="",descr="RRA:AVERAGE | MIN | MAX | LAST:xff:steps:rows"})
+ return {value=newdb}