mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
catos support for syslog
git-svn-id: http://www.observium.org/svn/observer/trunk@2187 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -36,7 +36,15 @@ function process_syslog ($entry, $update)
|
|||||||
if ($entry['device_id'] && !$delete)
|
if ($entry['device_id'] && !$delete)
|
||||||
{
|
{
|
||||||
$os = mysql_result(mysql_query("SELECT `os` FROM `devices` WHERE `device_id` = '".$entry['device_id']."'"),0);
|
$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<program>[A-Z0-9\-_]*):(?P<msg>(.*))#', $entry['msg'], $matches);
|
||||||
|
$entry['msg'] = $matches['msg'];
|
||||||
|
$entry['program'] = $matches['program'];
|
||||||
|
unset($matches);
|
||||||
|
}
|
||||||
|
elseif ($os == "ios" || $os == "iosxe")
|
||||||
{
|
{
|
||||||
if (strstr($entry[msg], "%"))
|
if (strstr($entry[msg], "%"))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user