improve smokeping filename detection (see filenames with underscores instead of dots). this is temporary until we "discovery" these rather than look for them on the fly.

git-svn-id: http://www.observium.org/svn/observer/trunk@3005 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2012-04-09 13:03:42 +00:00
parent 8c88728143
commit 7ffe4f2de1
4 changed files with 24 additions and 0 deletions
@@ -8,10 +8,12 @@
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;
}