add cisco processor polling and many other fixes

git-svn-id: http://www.observium.org/svn/observer/trunk@402 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2009-04-11 19:10:48 +00:00
parent 6f5d6c02d1
commit 44f3a83038
21 changed files with 1103 additions and 28 deletions

View File

@@ -28,7 +28,13 @@ function process_syslog ($entry, $update) {
list(,$entry[msg]) = split(": %", $entry['msg']);
$entry['msg'] = "%" . $entry['msg'];
$entry['msg'] = preg_replace("/^%(.+?):\ /", "\\1||", $entry['msg']);
} else { $entry['msg'] = "||" . $entry['msg']; }
} else {
$entry['msg'] = preg_replace("/^.*[0-9]:/", "", $entry['msg']);
$entry['msg'] = preg_replace("/^[0-9][0-9]\ [A-Z]{3}:/", "", $entry['msg']);
$entry['msg'] = preg_replace("/^(.+?):\ /", "\\1||", $entry['msg']);
#$entry['msg'] = "||" . $entry['msg'];
}
$entry['msg'] = preg_replace("/^.+\.[0-9]{3}:/", "", $entry['msg']);
$entry['msg'] = preg_replace("/^.+-Traceback=/", "Traceback||", $entry['msg']);
@@ -40,9 +46,7 @@ function process_syslog ($entry, $update) {
list($entry['program'], $entry['msg']) = explode("||", $entry['msg']);
}
if(!$entry['msg']) { $entry['msg'] = $entry['program']; }
if(!$entry['msg']) { $entry['msg'] = $entry['program']; unset ($entry['program']); }
} else {
$program = preg_quote($entry['program'],'/');