mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update syslog-notify-oxidized.php (#14005)
* Update syslog-notify-oxidized.php For oxidized to be able to catch from syslog a configuration change on a CISCO switch via SNMP. * Update syslog-notify-oxidized.php Small mistake with "," * Update syslog-notify-oxidized.php Modify with @murrant helps.
This commit is contained in:
@ -9,7 +9,7 @@ $os = $argv[2];
|
||||
$msg = $argv[3];
|
||||
|
||||
$oxidized_api = new \App\ApiClients\Oxidized();
|
||||
if (preg_match('/(SYS-(SW[0-9]+-)?5-CONFIG_I|VSHD-5-VSHD_SYSLOG_CONFIG_I): Configured from .+ by (?P<user>.+) on .*/', $msg, $matches)) {
|
||||
if (preg_match('/(SYS-(SW[0-9]+-)?5-CONFIG_I|VSHD-5-VSHD_SYSLOG_CONFIG_I): Configured from .+ by (?P<user>\S+)( on .*)?$/', $msg, $matches)) {
|
||||
$oxidized_api->updateNode($hostname, $msg, $matches['user']);
|
||||
} elseif (preg_match('/GBL-CONFIG-6-DB_COMMIT : Configuration committed by user \\\\\'(?P<user>.+?)\\\\\'..*/', $msg, $matches)) {
|
||||
$oxidized_api->updateNode($hostname, $msg, $matches['user']);
|
||||
|
Reference in New Issue
Block a user