EdgeSwitch syslog hook assistance

I have been at this all day and I can’t seem to find the issue.

I am trying to set up the syslog_hook functionality to notify oxidized that it need to spawn a worker to fetch a configuration.
I am attempting to do this for a Ubiquiti Edgeswitch.

The syslog entry created when a configuration is written is below or some variation of this, it always has the cli_txtcfg.c(840) at the start though.

cli_txtcfg.c(840) 1220 %% Text Configuration of length 5429 (222 CMDS) compressed to save 69% Flash

My config file has these entries added to this for the support per the docs. I am not a regex wizard so may have messed that part up.

$config[‘enable_syslog_hooks’] = 1;

$config[‘os’][‘edgeswitch’][‘syslog_hook’] = Array(‘regex’ => ‘.cli_txtcfg.c(840)/’, ‘script’ => ‘/opt/librenms/scripts/syslog-notify-oxidized.php’);

I am currently tailing my nginx access log for oxidized looking for the api calls generated by the syslog-notify-oxidized.php script but am not seeing anything whenever I generate the above mentioned syslog entry.

If someone could assist with the regex or point me in the right direction it would be appreciated.

Validate Output

==========================================================

Component Version
LibreNMS 579bfd4c3e147293ddf156ecc4d135a52de451f5
DB Schema 199
PHP 7.0.18-0ubuntu0.17.04.1
MySQL 10.1.22-MariaDB-
RRDTool 1.6.0
SNMP NET-SNMP 5.7.3
==========================================================

[WARN] Your install is out of date, last update: Sat, 15 Jul 2017 10:44:56 +0000
[OK] Database connection successful
[OK] Database schema correct

I’m assuming that you are using LibreNMS for syslog?

The script you are pointing to scripts/syslog-notify-oxidized.php looks like it needs a fallback as it won’t work for you - or you create your own script.

I am using LibreNMS for syslog and I am seeing the entry on LibreNMS when I generate it.

Would it be advisable to modify the existing script to include another elseif block for my case?

I am pretty green with programming but I like to learn as I go. From what I can tell after reading the script a bit more it looks like it only supports Ciso IOS, NXOS , and JunOS out of the box.

Thanks

I’d say it needs a little work that script, you’re already passing a regex to match the syslog script we should probably convert that to pass the username which is all that’s needed.

What username? There is no username in the syslog entry to pass. Am I misunderstanding something?

How would I go about writing to a log file to show the value of variables at the time the script is triggered?

Thanks,
-J