Ubuntu syslog-ng, config file too old

I just did a fresh installed of librenms on ubuntu 22.04 LTS. Everything is now OK on validate.php (included below)
I followed installation instruction for Ubuntu syslog here :

service won’t start. Here are the journalctl infos :

journalctl -xeu syslog-ng.service
Apr 17 16:03:41 snms1viru22 syslog-ng[3838]: [2023-04-17T16:03:41.728584] WARNING: Configuration file format is too old, syslog-ng is running in compatibility mode. Please update it to use the syslog-ng 3.35 format at your time of convenience. To upgrade the configuration, please review the warnings about incompatible changes printed by syslog-ng, and once completed change the @version header at the top of the configuration file; config-version=‘3.27’
Apr 17 16:03:41 snms1viru22 syslog-ng[3838]: [2023-04-17T16:03:41.741024] Error resolving reference; content=‘source’, name=‘s_sys’, location=‘/etc/syslog-ng/conf.d/librenms.conf:12:9’
Apr 17 16:03:41 snms1viru22 systemd[1]: syslog-ng.service: Main process exited, code=exited, status=2/INVALIDARGUMENT

/etc/syslog-ng/conf.d/librenms.conf file was created with copy/paste

Where can I find librenms.conf working with new version ?


Component Version
LibreNMS 23.4.1-19-g0a351b49f (2023-04-17T07:51:35-04:00)
DB Schema 2023_04_12_174529_modify_ports_table (250)
PHP 8.1.2-1ubuntu2.11
Python 3.10.6
Database MariaDB 10.6.12-MariaDB-0ubuntu0.22.04.1
RRDTool 1.7.2
SNMP 5.9.1

[OK] Composer Version: 2.5.5
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK] Database and column collations are correct
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok

has modern (and old style config examples)

While looking on the other posts, I found this one

Changing source(s_sys); to source(s_src); does solve the problem. Warning about config file too old is still there, but service is able to start.

sudo nano /etc/syslog-ng/conf.d/librenms.conf

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_src); <===========

1 Like

Been pulling my hair out on this thanks for the fix.