Files
librenms/html/includes/graphs/device/smokeping_in_all.inc.php
T
Adam Amstrong 9df4b3bc0b basic smokeping
git-svn-id: http://www.observium.org/svn/observer/trunk@2620 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-30 19:15:58 +00:00

49 lines
1.2 KiB
PHP

<?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;
}
}
}
}
}
}
$i=0;
foreach($files as $source => $filename)
{
$i++;
$rrd_list[$i]['filename'] = $config['smokeping']['dir'] . $filename;
$rrd_list[$i]['descr'] = $source;
$rrd_list[$i]['ds'] = "median";
}
$colours='mixed';
$nototal = 1;
$simple_rrd = 1;
include("includes/graphs/generic_multi_line.inc.php");
?>