mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
smokeping basic working
git-svn-id: http://www.observium.org/svn/observer/trunk@2622 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user