Hot answers tagged

55 votes
Accepted

What is the difference between syslog, rsyslog and syslog-ng?

Basically, they are all the same, in the way they all permit the logging of data from different types of systems in a central repository. But they are three different project, each project trying to ...
  • 13.1k
33 votes

What is the difference between syslog, rsyslog and syslog-ng?

these are 3 different kind of log managers : it enables your system to collect filter, and transmit/store logs. Syslog (daemon also named sysklogd) is the default LM in common Linux distributions. ...
  • 498
25 votes

HAProxy logging to syslog

Very tricky. :-) And here is the trick answer: Notice the file in /etc/rsyslog.d It says to log haproxy into /var/log/haproxy.log But this will not take effect without restarting rsyslog: service ...
  • 361
18 votes

Remove UFW Block from kern.log and sys.log

UFW configuration option only toggles logging on/off (and alternatively specifies custom logging level): logging on|off|LEVEL toggle logging. Logged packets use the LOG_KERN syslog facility. ...
  • 44.8k
12 votes

HAProxy logging to syslog

The default haproxy.conf file provides clear instructions under the Global settings - global. Here i am copy pasting it for you - #---------------------------------------------------------------------...
  • 9,176
11 votes

Getting journald logs to a plain text file

I do realize this question is a little dated, but it is one of the first search results on Google. That and the --json option does not seem to work for me and does not show up in the man pages. I ...
10 votes

Server crash with ascii NUL characters in syslog ( ^@^@^@... )

I'll share more widely the great answer given by @n-st: NUL bytes in the syslog are a common effect of a crash that prevented the system from cleanly syncing and unmounting the filesystem. They don'...
  • 752
10 votes

reliable export of journalctl logs

You can install a syslog daemon such as rsyslog (the default on Red Hat derived systems). This will log all journal entries in a more backward compatible manner, and of course you can specify a custom ...
10 votes
Accepted

Is it still allowed to have log files under the new GDPR?

The General Data Protection Regulation (GDPR) is for protecting privacy and giving the control over personal data back to citizens. It's not a list of things not to do, even though there's quite a ...
  • 44.8k
10 votes

Journalctl and syslog: How does it actually work?

The link(s) between journald and rsyslog is controlled on the rsyslog side through the use of its input and output modules; there is an imjournal and omjournal for reading from and writing to the ...
  • 4,731
9 votes
Accepted

How can I suppress Postfix anvil statistics from system logs?

If you want to change the frequency of the logs you can set anvil_status_update_time in main.cf. The default is 600s. http://www.postfix.org/postconf.5.html#anvil_status_update_time Two hours worked ...
9 votes

What is the difference between syslog, rsyslog and syslog-ng?

From where can I get the source code for syslog() This is provided by glibc or the libc implementations on other Unix flavors. This call basically submits your message to the syslog unix domain ...
  • 986
9 votes
Accepted

Create separated syslog file for each host with rsyslog

It seems it is documented on rsyslog web site here : https://www.rsyslog.com/storing-and-forwarding-remote-messages To summarize : You should define a template for log files, something like e.g : #...
  • 13.1k
7 votes

Switch on PAM debugging to Syslog

I just happened to spend several hours trying to find out how to enable debug logs in PAM on CentOS 6.4. Although this question is for Debian, I will still write down how to do it on CentOS in the ...
  • 778
7 votes

No more logging after upgrade to Debian Wheezy

Came here because one of our customers' servers was upgraded from Debian Etch (4) to squeeze (6), to wheezy (7) and finally to Jessie (8) last week and /var/log/syslog had no activity since then. It ...
7 votes

Is it still allowed to have log files under the new GDPR?

Because of [the GDPR] the gathering of IP addresses is not allowed That simplification is patently incorrect. The GDPR provides a legal framework for how personal data may be collected, stored and ...
  • 74.1k
6 votes

HAProxy logging to syslog

Comment out this line from /etc/rsyslog.d # Send HAProxy messages to a dedicated logfile if $programname startswith 'haproxy' then /var/log/haproxy.log
  • 161
6 votes

How to add message that will be read with dmesg?

@Calandoa's answer no longer works for Kernel +3.10. Combined his code, and the example code I found here. Then improved on the code quality... Code saved to printk_user.c #include <linux/module.h&...
  • 213
6 votes

logrotate - run the postrotate after all processing

Use sharedscripts: Normally logrotate runs the postrotate script every time it rotates a log. This is also true for multiple logs that use the same configuration block. For example, a web ...
  • 183
6 votes

How can I reduce the verbosity of certain Ansible tasks to not leak passwords into syslog?

The no_log attribute hides data in syslog. It can be applied to a single task - name: secret task shell: /usr/bin/do_something --value={{ secret_value }} no_log: True or the playbook: - hosts: ...
6 votes

How do I handle messages from my custom application in rsyslog?

First, make a config file in /etc/rsyslog.d, such as 01-alpha.conf, to make things organized. This way, your 01-alpha.conf will be read first than 50-default.conf. 50-default.conf has a rule to log ...
5 votes

How can I prevent cron from filling up my syslog?

In Ubuntu 14.04.5 (and likely elsewhere) there is rsyslogd instead of syslogd. TranslucentCloud hinted at this with Debian Jessie, but the same solution (but changing rsyslog.conf instead of syslogd....
  • 51
5 votes

Why is Syslog Not Writing Logs To The Designated Files?

For those lost in googling with similar symptoms after an update from Ubuntu LTS 12.04 to 14.04.1: syslog was replaced by rsyslog, which is for some reason not installed by the distribution-upgrade. ...
  • 151
5 votes
Accepted

How to forward Docker container logs to ELK?

Docker compose has the logging keyword: source logging: driver: syslog options: syslog-address: "tcp://192.168.0.42:123" So if you know where to go from there, go for it. If not, I can ...
  • 418
4 votes
Accepted

How can I redirect logfile output to a network socket?

I'd recommend that you consider using logstash for this. It can consume text log files and pipe the log entries to a wide variety of other systems, including syslog. You may be able to hack something ...
  • 109k
4 votes

Stop crontab from filling syslog Ubuntu 15.04

Try adding cron.none to the line that logs to syslog *.*;auth,authpriv.none,cron.none -/var/log/syslog EDIT: more detail: From the ubuntu manpage for syslog http://manpages.ubuntu.com/manpages/...
4 votes
Accepted

systemd: Failed to make us a subreaper: Invalid argument. SSH

The answer is on the next line of the log output: 10:33:51 pap1 systemd[12228]: Failed to make us a subreaper: Invalid argument 10:33:51 pap1 systemd[12228]: Perhaps the kernel version is too old (&...
4 votes

How can I query rsyslog settings?

There is no such option for querying rsyslog config, see the rsyslogd(8) man page and that's why you can't find anything. If you want to check rsyslog config, you may use the following command: ...
  • 8,941
4 votes

How can I reduce the verbosity of certain Ansible tasks to not leak passwords into syslog?

I developped a callback plugin to hide passwords for default outputs, it parse ouput dictionary for key that contains password, for each of them, it replace value by ********. Create a file named ...
  • 304

Only top scored, non community-wiki answers of a minimum length are eligible