smokeping basic working

git-svn-id: http://www.observium.org/svn/observer/trunk@2622 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2011-09-30 19:46:32 +00:00
parent 8bbd0b8ca5
commit b3a19908ab
4 changed files with 65 additions and 81 deletions

View File

@@ -1,36 +1,9 @@
<?php
$files = array();
if ($handle = opendir($config['smokeping']['dir']))
{
while (false !== ($file = readdir($handle)))
{
if ($file != "." && $file != "..")
{
if (eregi(".rrd", $file))
{
if (eregi("~", $file))
{
list($target,$slave) = explode("~", str_replace(".rrd", "", $file));
if($target == $device['hostname'])
{
$files[$slave] = $file;
}
} else {
$target = str_replace(".rrd", "", $file);
if($target == $device['hostname'])
{
$files['observium'] = $file;
}
}
}
}
}
}
include("smokeping_common.inc.php");
$i=0;
foreach($files as $source => $filename)
foreach($smokeping_files['in'][$device['hostname']] as $source => $filename)
{
$i++;
$rrd_list[$i]['filename'] = $config['smokeping']['dir'] . $filename;