From 238c8cf85a55a29349b1ad12c052aa907a1bc77e Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Wed, 27 Apr 2011 19:34:16 +0000 Subject: [PATCH] catos support for syslog git-svn-id: http://www.observium.org/svn/observer/trunk@2187 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/syslog.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/syslog.php b/includes/syslog.php index 34ba79c7e5..0277e30926 100755 --- a/includes/syslog.php +++ b/includes/syslog.php @@ -36,7 +36,15 @@ function process_syslog ($entry, $update) if ($entry['device_id'] && !$delete) { $os = mysql_result(mysql_query("SELECT `os` FROM `devices` WHERE `device_id` = '".$entry['device_id']."'"),0); - if ($os == "ios" || $os == "iosxe") + if ($os == 'catos') + { + $matches = array(); + preg_match('#%(?P[A-Z0-9\-_]*):(?P(.*))#', $entry['msg'], $matches); + $entry['msg'] = $matches['msg']; + $entry['program'] = $matches['program']; + unset($matches); + } + elseif ($os == "ios" || $os == "iosxe") { if (strstr($entry[msg], "%")) {