mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Added Juniper Junos syslog notification code (#9006)
DO NOT DELETE THIS TEXT #### Please note > Please read this information carefully. You can run `./scripts/pre-commit.php` to check your code before submitting. - [x] Have you followed our [code guidelines?](http://docs.librenms.org/Developing/Code-Guidelines/) #### Testers If you would like to test this pull request then please run: `./scripts/github-apply <pr_id>`, i.e `./scripts/github-apply 5926`
This commit is contained in:
committed by
Neil Lathwood
parent
1ea2ed273e
commit
7c10909d06
@@ -202,6 +202,18 @@ logging librenms.ip
|
|||||||
logging server librenms.ip 5 use-vrf default facility local6
|
logging server librenms.ip 5 use-vrf default facility local6
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Juniper Junos
|
||||||
|
```config
|
||||||
|
set system syslog host librenms.ip authorization any
|
||||||
|
set system syslog host librenms.ip daemon any
|
||||||
|
set system syslog host librenms.ip kernel any
|
||||||
|
set system syslog host librenms.ip user any
|
||||||
|
set system syslog host librenms.ip change-log any
|
||||||
|
set system syslog host librenms.ip source-address <management ip>
|
||||||
|
set system syslog host librenms.ip exclude-hostname
|
||||||
|
set system syslog time-format
|
||||||
|
```
|
||||||
|
|
||||||
If you have permitted udp and tcp 514 through any firewall then that should be all you need. Logs should start appearing and displayed within the LibreNMS web UI.
|
If you have permitted udp and tcp 514 through any firewall then that should be all you need. Logs should start appearing and displayed within the LibreNMS web UI.
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
@@ -248,3 +260,8 @@ $config['os']['nxos']['syslog_hook'][] = Array('regex' => '/%VSHD-5-VSHD_SYSLOG_
|
|||||||
```ssh
|
```ssh
|
||||||
$config['os']['iosxr']['syslog_hook'][] = Array('regex' => '/%GBL-CONFIG-6-DB_COMMIT/', 'script' => '/opt/librenms/scripts/syslog-notify-oxidized.php');
|
$config['os']['iosxr']['syslog_hook'][] = Array('regex' => '/%GBL-CONFIG-6-DB_COMMIT/', 'script' => '/opt/librenms/scripts/syslog-notify-oxidized.php');
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Juniper Junos
|
||||||
|
```ssh
|
||||||
|
$config['os']['junos']['syslog_hook'][] = Array('regex' => '/%UI_COMMIT:/', 'script' => '/opt/librenms/scripts/syslog-notify-oxidized.php');
|
||||||
|
```
|
||||||
|
@@ -31,4 +31,6 @@ if (preg_match('/(SYS-(SW[0-9]+-)?5-CONFIG_I|VSHD-5-VSHD_SYSLOG_CONFIG_I): Confi
|
|||||||
oxidized_node_update($hostname, $msg, $matches['user']);
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
||||||
} elseif (preg_match('/HWCM\/4\/CFGCHANGE/', $msg, $matches)) { //Huawei VRP devices CFGCHANGE syslog
|
} elseif (preg_match('/HWCM\/4\/CFGCHANGE/', $msg, $matches)) { //Huawei VRP devices CFGCHANGE syslog
|
||||||
oxidized_node_update($hostname, $msg);
|
oxidized_node_update($hostname, $msg);
|
||||||
|
} elseif (preg_match('/UI_COMMIT: User \\\\\'(?P<user>.+?)\\\\\' .*/', $msg, $matches)) {
|
||||||
|
oxidized_node_update($hostname, $msg, $matches['user']);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user