Artix Linux => System => Topic started by: teyuss on 12 October 2024, 03:37:03
Title: Syslog-ng stopped logging.
Post by: teyuss on 12 October 2024, 03:37:03
The Files auth.log, user.log, syslog.log, messages.log, kernel.log, iptables.log, everything.log, errors.log, daemon.log and crond.log are no longer updating. I have no idea what's causing this problem.
The Rc.log file is being updated. There are some error messages, but I think they are caused by optional dependencies.
syslog-ng |Error opening plugin module; module='afsql', error='libdbi.so.1: cannot open shared object file: No such file or directory' syslog-ng |Error opening plugin module; module='afmongodb', error='libmongoc-1.0.so.0: cannot open shared object file: No such file or directory' syslog-ng |Error opening plugin module; module='afsnmp', error='libnetsnmp.so.40: cannot open shared object file: No such file or directory' syslog-ng |Error opening plugin module; module='afsmtp', error='libesmtp.so.6.2.0: cannot open shared object file: No such file or directory' syslog-ng |Error opening plugin module; module='afamqp', error='librabbitmq.so.4: cannot open shared object file: No such file or directory'
Here is the content of the /etc/syslog-ng/syslog-ng.conf file.
############################################################################# # Default syslog-ng.conf file which collects all local logs into a # single file called /var/log/messages. #
@version: 4.8 @include "scl.conf"
source s_local { system(); internal(); };
source s_network { default-network-drivers( # NOTE: TLS support # # the default-network-drivers() source driver opens the TLS # enabled ports as well, however without an actual key/cert # pair they will not operate and syslog-ng would display a # warning at startup. # #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert")) ); };
Title: Re: Syslog-ng stopped logging.
Post by: Dudemanguy on 12 October 2024, 06:33:23
I think this is just the recent change to the default config file which actually disables logging. You should have gotten this upgrade message (https://gitea.artixlinux.org/packages/syslog-ng/src/branch/master/syslog-ng.install) in theory. Note, I don't know anything syslog-ng configuration so I don't know what you would actually do to renable the logging.
Title: Re: Syslog-ng stopped logging.
Post by: gripped on 12 October 2024, 15:01:36
I think this is just the recent change to the default config file which actually disables logging.
That's hilarious on a few levels. Like why would the default be no logging and why would the message not at least give some explanation of what you'd need to do to enable logging?
@teyuss After using syslog-ng for years I grew sick of the way it handles python and dependencies and also regular minor semantic changes to the configuration file format. So I switched to metalog. After reading this thread I'm glad I did.
Title: Re: Syslog-ng stopped logging.
Post by: teyuss on 12 October 2024, 15:39:09
OK, reverting the configuration file back to version 4.6 fixed the problem... Does anyone have any idea where to change the configuration file so that syslog start logging again? 4.6
############################################################################# # Default syslog-ng.conf file which collects all local logs into a # single file called /var/log/messages. #
@version: 4.8 @include "scl.conf"
source s_local { system(); internal(); };
source s_network { default-network-drivers( # NOTE: TLS support # # the default-network-drivers() source driver opens the TLS # enabled ports as well, however without an actual key/cert # pair they will not operate and syslog-ng would display a # warning at startup. # #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert")) ); };
Title: Re: Syslog-ng stopped logging.
Post by: Dju on 29 October 2024, 15:40:22
hello, same here. not the first time syslog-ng does weird things, or writes a s**tload of errors at boot :p so i disable syslog-ng, removed it and installed "rsyslog-nosystemd-git" with pamac from AUR. then wrote a small init file for openrc in /etc/init.d/rsyslog :
depend() { provide rsyslogd syslog need $remote_fs $time }
finally, i can enable & launch the rsyslog service, and have all my normal log files in a reliable way :) (i've used rsyslog for years, it just works and has never betrayed me :-* )
Title: Re: Syslog-ng stopped logging.
Post by: camelia on 09 March 2025, 00:51:30
Ok, it seems nobody provided an actual answer on how to fix this properly, so here is an explanation.
This has nothing to do with the missing dependencies, this behavior is caused by the fact that syslog-ng is unconfigured, and that the default configuration is to not log anything by default.
There are basically four "parts" in the logging configuration: /etc/syslog-ng/syslog-ng.conf
The first one is the source. We won't change this, because the problem doesn't come from there. They are the first two definitions of the default config, and look like this:
source s_network { default-network-drivers( # NOTE: TLS support # # the default-network-drivers() source driver opens the TLS # enabled ports as well, however without an actual key/cert # pair they will not operate and syslog-ng would display a # warning at startup. # #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert")) ); };
Then, we have the destination of logs (i.e. the location of the logs). It is the part of the config that looks like this:
Now, if we take a look at the default configuration (version 4.8 ), we can see that all the log definitions (at the bottom of the file) have a source specified, but that the destination and filter are commented everywhere. To enable logging, we just need to uncomment them. For instance, if we wish to enable authentication logs, error logs, and kernel logs, we can simply do the following:
log { source(s_local); filter(f_authpriv); # we uncommented this destination(d_authlog); # we uncommented this }; log { source(s_local); filter(f_err); # we uncommented this destination(d_errors); # we uncommented this }; log { source(s_local); filter(f_kernel); # we uncommented this destination(d_kernel); # we uncommented this };
But not logging anything by default is a questionable choice, indeed.
Title: Re: Syslog-ng stopped logging.
Post by: kiblaster on 13 March 2025, 21:04:55
I switched to world/metalog thanks for letting us know.
1· It has only two deps and they are probably installed already. 2·
Quote
Metalog is easier to configure than syslogd and syslog-ng, accepts unlimited number of rules and has (switchable) memory bufferisation for maximal performance.
3· Sane default to have a log. What the point of running without logging just wasting resources?
Title: Re: Syslog-ng stopped logging.
Post by: mrbrklyn on 27 April 2025, 17:30:51
Do we have a new default conf file for it. I once tried to translate the old to the new and it failed.
Title: Re: Syslog-ng stopped logging.
Post by: mrbrklyn on 08 May 2025, 03:20:09
Ok, it seems nobody provided an actual answer on how to fix this properly, so here is an explanation.
This has nothing to do with the missing dependencies, this behavior is caused by the fact that syslog-ng is unconfigured, and that the default configuration is to not log anything by default.
There are basically four "parts" in the logging configuration: /etc/syslog-ng/syslog-ng.conf
The first one is the source. We won't change this, because the problem doesn't come from there. They are the first two definitions of the default config, and look like this:
source s_network { default-network-drivers( # NOTE: TLS support # # the default-network-drivers() source driver opens the TLS # enabled ports as well, however without an actual key/cert # pair they will not operate and syslog-ng would display a # warning at startup. # #tls(key-file("/path/to/ssl-private-key") cert-file("/path/to/ssl-cert")) ); };
Then, we have the destination of logs (i.e. the location of the logs). It is the part of the config that looks like this:
Now, if we take a look at the default configuration (version 4.8 ), we can see that all the log definitions (at the bottom of the file) have a source specified, but that the destination and filter are commented everywhere. To enable logging, we just need to uncomment them. For instance, if we wish to enable authentication logs, error logs, and kernel logs, we can simply do the following:
log { source(s_local); filter(f_authpriv); # we uncommented this destination(d_authlog); # we uncommented this }; log { source(s_local); filter(f_err); # we uncommented this destination(d_errors); # we uncommented this }; log { source(s_local); filter(f_kernel); # we uncommented this destination(d_kernel); # we uncommented this };
But not logging anything by default is a questionable choice, indeed.
This is a twisted configuration file poorly designed and overkill.
Title: Re: Syslog-ng stopped logging.
Post by: camelia on 14 June 2025, 10:40:33