2017-06-17 14:21:21 +00:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
2018-04-26 15:14:28 +00:00
|
|
|
$init_modules = [];
|
2017-06-17 14:21:21 +00:00
|
|
|
require __DIR__ . '/../includes/init.php';
|
|
|
|
|
|
|
|
$hostname = $argv[1];
|
|
|
|
$os = $argv[2];
|
|
|
|
$msg = $argv[3];
|
|
|
|
|
|
|
|
if (preg_match('/(SYS-(SW[0-9]+-)?5-CONFIG_I|VSHD-5-VSHD_SYSLOG_CONFIG_I): Configured from .+ by (?P<user>.+) on .*/', $msg, $matches)) {
|
2018-04-26 15:14:28 +00:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2017-06-23 21:16:35 +00:00
|
|
|
} elseif (preg_match('/GBL-CONFIG-6-DB_COMMIT : Configuration committed by user \\\\\'(?P<user>.+?)\\\\\'..*/', $msg, $matches)) {
|
2018-04-26 15:14:28 +00:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2017-09-01 17:37:01 +00:00
|
|
|
} elseif (preg_match('/ASA-(config-)?5-111005: (?P<user>.+) end configuration: OK/', $msg, $matches)) {
|
2018-04-26 15:14:28 +00:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2018-02-21 10:03:43 +00:00
|
|
|
} elseif (preg_match('/startup-config was changed by (?P<user>.+) from telnet client .*/', $msg, $matches)) {
|
2018-04-26 15:14:28 +00:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2018-04-17 09:32:41 +00:00
|
|
|
} elseif (preg_match('/HWCM\/4\/CFGCHANGE/', $msg, $matches)) { //Huawei VRP devices CFGCHANGE syslog
|
2018-04-26 15:14:28 +00:00
|
|
|
oxidized_node_update($hostname, $msg);
|
2018-08-11 21:49:39 +00:00
|
|
|
} elseif (preg_match('/UI_COMMIT: User \\\\\'(?P<user>.+?)\\\\\' .*/', $msg, $matches)) {
|
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2018-09-18 15:31:40 +00:00
|
|
|
} elseif (preg_match('/IMI.+.Startup-config saved on .+ by (?P<user>.+) via .*/', $msg, $matches)) {
|
2018-11-10 22:12:12 +00:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']); //Alliedware Plus devices. Requires at least V5.4.8-2.1
|
|
|
|
} elseif (preg_match('/System configuration saved/', $msg, $matches)) {
|
|
|
|
oxidized_node_update($hostname, $msg); //ScreenOS
|
2017-06-17 14:21:21 +00:00
|
|
|
}
|