Setup LibreNMS Logging
Enable Syslog Extension
Set the following value:
Install syslog-ng
Create and save the config file:
Paste the following into the file:
source s_net {
tcp(port(514) flags(syslog-protocol));
udp(port(514) flags(syslog-protocol));
};
destination d_librenms {
program("/opt/librenms/syslog.php" template ("$HOST||$FACILITY||$PRIORITY||$LEVEL||$TAG||$R_YEAR-$R_MONTH-$R_DAY $R_HOUR:$R_MIN:$R_SEC||$MSG||$PROGRAM\n") template-escape(yes));
};
log {
source(s_net);
source(s_src);
destination(d_librenms);
};
Start syslog-ng:
Server Configuration
The configuration for Ubuntu 22.04 is located here.