Updated smokeping to support Rosiaks integration

This commit is contained in:
laf
2015-06-24 11:41:10 +01:00
parent db4a5de847
commit 432fa5cadd
7 changed files with 54 additions and 62 deletions
+1 -28
View File
@@ -138,34 +138,7 @@ if (device_permitted($vars['device']) || $check_device == $vars['device'])
</li>');
}
if (isset($config['smokeping']['dir']))
{
$smokeping_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));
$target = str_replace("_", ".", $target);
$smokeping_files['in'][$target][$slave] = $file;
$smokeping_files['out'][$slave][$target] = $file;
} else {
$target = str_replace(".rrd", "", $file);
$target = str_replace("_", ".", $target);
$smokeping_files['in'][$target][$config['own_hostname']] = $file;
$smokeping_files['out'][$config['own_hostname']][$target] = $file;
}
}
}
}
}
}
$smokeping_files = get_smokeping_files($device);
if (count($smokeping_files['in'][$device['hostname']]) || count($smokeping_files['out'][$device['hostname']]))
{