From 6ff6b53ee67698c433605cc3bd760c095b4b707f Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Fri, 3 Jul 2009 06:53:14 +0000 Subject: Adding functionallity to see 'rrdtool info' on the existing DBs. --- rrdtool-model.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'rrdtool-model.lua') 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 -- cgit v1.2.3