JUNOS: config does't backup after commit

I can’t get config backup immediately after configuration changes on my Juniper device.
"
#Enabling Syslog on LibreNMS
$config[‘enable_syslog’] = 1;
$config[‘enable_syslog_hooks’] = 1;
$config[‘os’][‘junos’][‘syslog_hook’][] = Array(‘regex’ => ‘mgd[[0-9]+]: UI_COMMIT: .*’, ‘script’ => ‘/opt/librenms/scripts/syslog-notify-oxidized.php’);
"
Any ideas?

Do you use librenms to store syslog data?

I have this configuration in config.php file.

    $config['enable_syslog'] = 1;
    $config['enable_syslog_hooks'] = 1;

Ok but do you actually send syslog data to your librenms server?

Sure.

Should it not be:

$config[‘os’][‘junos’][‘syslog_hook’][] = Array(‘regex’ => ‘UI_COMMIT: .*’, ‘script’ => ‘/opt/librenms/scripts/syslog-notify-oxidized.php’);

I have this piece of code in my config, but unfortunately doesn’t work.
When I tried to take the changed config from juniper device via the oxidized-web, I couldn’t get it. Screenshot is attached.
It is worked after I press the ‘Reload’ button.

@anetrjuns Hello, Patches for notify script part and hook was accepted upstream yesterday, so if you use daily updates you can already test or wait for next release. You will need to add syslog_hook part into your config.php, check here https://docs.librenms.org/#Extensions/Syslog/#external-hooks

1 Like