mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
syntaxer run + manual cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@2630 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -93,27 +93,32 @@ 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));
|
||||
$smokeping_files['in'][$target][$slave] = $file;
|
||||
$smokeping_files['out'][$slave][$target] = $file;
|
||||
} else {
|
||||
$target = str_replace(".rrd", "", $file);
|
||||
$smokeping_files['in'][$target][$config['own_hostname']] = $file;
|
||||
$smokeping_files['out'][$config['own_hostname']][$target] = $file;
|
||||
}
|
||||
}
|
||||
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));
|
||||
$smokeping_files['in'][$target][$slave] = $file;
|
||||
$smokeping_files['out'][$slave][$target] = $file;
|
||||
} else {
|
||||
$target = str_replace(".rrd", "", $file);
|
||||
$smokeping_files['in'][$target][$config['own_hostname']] = $file;
|
||||
$smokeping_files['out'][$config['own_hostname']][$target] = $file;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (count($smokeping_files))
|
||||
{
|
||||
|
Reference in New Issue
Block a user