mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-26 00:18:03 +02:00
git-svn-id: http://www.observium.org/svn/observer/trunk@2620 61d68cd4-352d-0410-923a-c4978735b2b8
49 lines
1.2 KiB
PHP
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");
|
|
|
|
?>
|