2011-09-30 19:48:53 +00:00
|
|
|
<?php
|
|
|
|
|
2011-10-01 10:10:02 +00:00
|
|
|
if (isset($config['smokeping']['dir'])) {
|
2011-09-30 19:48:53 +00:00
|
|
|
$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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|