continuation of storage changes, addition of rrdtool functions

git-svn-id: http://www.observium.org/svn/observer/trunk@937 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-02-24 13:46:12 +00:00
parent afdf4fbfc3
commit 3405339a3d
13 changed files with 146 additions and 132 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
function rrdtool_update($rrdfile, $rrdupdate)
{
return rrdtool("update", $rrdfile, $rrdupdate);
}
function rrdtool_create($rrdfile, $rrdupdate)
{
return rrdtool("create", $rrdfile, $rrdupdate);
}
function rrdtool_fetch($rrdfile, $rrdupdate)
{
return rrdtool("fetch", $rrdfile, $rrdupdate);
}
function rrdtool_graph($rrdfile, $rrdupdate)
{
return rrdtool("graph", $rrdfile, $rrdupdate);
}
function rrdtool_last($rrdfile, $rrdupdate)
{
return rrdtool("last", $rrdfile, $rrdupdate);
}
function rrdtool_lastupdate($rrdfile, $rrdupdate)
{
return rrdtool("lastupdate", $rrdfile, $rrdupdate);
}
function rrdtool($command, $file, $options)
{
global $config; global $debug;
if ($config['debug']) { echo($config['rrdtool'] . " $command $file $options \n"); }
return shell_exec($config['rrdtool'] . " $command $file $options");
}
?>