diff options
Diffstat (limited to 'rrdtool-model.lua')
-rw-r--r-- | rrdtool-model.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rrdtool-model.lua b/rrdtool-model.lua index f85f08b..b4cbb97 100644 --- a/rrdtool-model.lua +++ b/rrdtool-model.lua @@ -125,3 +125,13 @@ function remove_file(self, path, userid) end return cfe({ value=success, label="Delete config file result", errtxt=errtxt }) end + +function rrd_info(self, path, userid) + local success, errtxt + if (validfilename(path)) then + local f = io.popen( "/usr/bin/rrdtool info ".. tostring(path) ) + success = f:read("*a") or "" + f:close() + end + return cfe({ value=success, label="rrdtool info ".. tostring(path) , errtxt=errtxt }) +end |