2017-06-17 15:21:21 +01:00
|
|
|
#!/usr/bin/env php
|
|
|
|
<?php
|
|
|
|
|
2018-04-26 16:14:28 +01:00
|
|
|
$init_modules = [];
|
2017-06-17 15:21:21 +01: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 16:14:28 +01:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2017-06-23 22:16:35 +01:00
|
|
|
} elseif (preg_match('/GBL-CONFIG-6-DB_COMMIT : Configuration committed by user \\\\\'(?P<user>.+?)\\\\\'..*/', $msg, $matches)) {
|
2018-04-26 16:14:28 +01:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2017-09-01 18:37:01 +01:00
|
|
|
} elseif (preg_match('/ASA-(config-)?5-111005: (?P<user>.+) end configuration: OK/', $msg, $matches)) {
|
2018-04-26 16:14:28 +01: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 16:14:28 +01:00
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2018-04-17 11:32:41 +02:00
|
|
|
} elseif (preg_match('/HWCM\/4\/CFGCHANGE/', $msg, $matches)) { //Huawei VRP devices CFGCHANGE syslog
|
2018-04-26 16:14:28 +01:00
|
|
|
oxidized_node_update($hostname, $msg);
|
2018-08-12 00:49:39 +03:00
|
|
|
} elseif (preg_match('/UI_COMMIT: User \\\\\'(?P<user>.+?)\\\\\' .*/', $msg, $matches)) {
|
|
|
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
2018-09-19 03:31:40 +12:00
|
|
|
} elseif (preg_match('/IMI.+.Startup-config saved on .+ by (?P<user>.+) via .*/', $msg, $matches)) {
|
2018-11-10 23:12:12 +01: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
|
2021-10-21 08:45:16 +01:00
|
|
|
} elseif (preg_match('/Running Config Change/', $msg, $matches)) {
|
|
|
|
oxidized_node_update($hostname, $msg); //HPE and Aruba Procurve devices
|
2017-06-17 15:21:21 +01:00
|
|
|
}
|