Syslog Display Format

Version e8a74e1
DB Schema #61
Apache 2.2.15 (CentOS)
PHP 5.3.3
MySQL 5.1.73
RRDtool 1.3.8

We were just testing for making it in production. I can make a fresh install and work on it.

You need to do a fresh install/upgrade before going to production I think, it will be better.

Hello, I have a fresh install on centos-7.3. Everything is good but while adding syslog as per the guide on https://docs.librenms.org/Extensions/Syslog/ i cannot start the syslog-ng service. I only added the configuration suggested to syslog-ng.conf file. Is there anything i have missed.

Here is my ./validate.php

./validate.php
PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib64/php/modules/php_sqli.dll’ - /usr/lib64/php/modules/php_sqli.dll: cannot open shared object file: No such file or directory in Unknown on line 0

Component Version
LibreNMS 1.31.03-3-g6914666
DB Schema 205
PHP 5.4.16
MySQL 5.5.52-MariaDB
RRDTool 1.4.8
SNMP NET-SNMP 5.7.2

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

[OK] Database connection successful
[OK] Database schema correct

I would double check your conf. Here is what i have for my syslog-ng conf https://pastebin.com/Yj3iY2B1

when you try and start syslog-ng what message do you receive?

also you need to fix this.

Hello,

I tried the pastebin code. Following is the error i got in starting the syslog-ng service

systemctl status syslog-ng
● syslog-ng.service - System Logger Daemon
Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit) since Sat 2017-09-02 13:33:35 +0545; 9s ago
Docs: man:syslog-ng(8)
Process: 20501 ExecStart=/usr/sbin/syslog-ng -F -p /var/run/syslogd.pid (code=exited, status=1/FAILURE)
Main PID: 20501 (code=exited, status=1/FAILURE)
Status: “Starting up… (Sat Sep 2 13:33:35 2017”

Sep 02 13:33:35 Hostname systemd[1]: Unit syslog-ng.service entered failed state.
Sep 02 13:33:35 Hostname systemd[1]: syslog-ng.service failed.
Sep 02 13:33:35 Hostname systemd[1]: syslog-ng.service holdoff time over, scheduling restart.
Sep 02 13:33:35 Hostname systemd[1]: start request repeated too quickly for syslog-ng.service
Sep 02 13:33:35 Hostname systemd[1]: Failed to start System Logger Daemon.
Sep 02 13:33:35 Hostname systemd[1]: Unit syslog-ng.service entered failed state.
Sep 02 13:33:35 Hostname systemd[1]: syslog-ng.service failed.
Sep 02 13:33:35 Hostname systemd[1]: start request repeated too quickly for syslog-ng.service
Sep 02 13:33:35 Hostname systemd[1]: Failed to start System Logger Daemon.
Sep 02 13:33:35 Hostname systemd[1]: syslog-ng.service failed.

Did clear out the conf before you paste in the new config?

i removed the old one and replaced with the new code. The service started with no errors. But, the log is not being fetched still. Client syslog-ng configuration is good. Does getting syslog in librenms takes some time??

is syslog enabled in librenms config.php?

Well depends if your devices are sending logs.

Yes, it is enabled. My clients are same that i tried on librenms previous version. Logs were being sent on my previous installation.

Ok…are you sure syslog-ng is running?

systemctl status syslog-ng
● syslog-ng.service - System Logger Daemon
Loaded: loaded (/usr/lib/systemd/system/syslog-ng.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2017-09-02 17:47:44 +0545; 55min ago
Docs: man:syslog-ng(8)
Main PID: 25372 (syslog-ng)
CGroup: /system.slice/syslog-ng.service
├─ 4803 php /opt/librenms/syslog.php
└─25372 /usr/sbin/syslog-ng -F -p /var/run/syslogd.pid

Sep 02 17:47:44 Hostname systemd[1]: Starting System Logger Daemon…
Sep 02 17:47:44 Hostname systemd[1]: Started System Logger Daemon.

Okay. double check your firewalld on centos, make sure you have set to allow syslog ports

firewall-cmd --list-all
public (active)
target: default
icmp-block-inversion: no
interfaces: eth0
sources:
services: dhcpv6-client dns http openvpn snmp ssh
ports: 514/tcp 161/udp 953/udp
protocols:
masquerade: yes
forward-ports:
sourceports:
icmp-blocks:
rich rules:

i think you need 514 tcp and 514 udp.

firewall-cmd --permanent --zone-public --add-service=syslog

This solved my problem.

A post was split to a new topic: Can’t get Syslog to work