Gentoo Archives: gentoo-user

From: Dan Egli <dan@×××××××××××.site>
To: gentoo-user@l.g.o
Subject: [gentoo-user] syslog-ng misbehaving
Date: Wed, 07 Apr 2021 05:12:26
Message-Id: c313974a-87af-80e5-9cdd-80e2e666c380@newideatest.site
1 Before I seek out a mailing list for syslog-ng, I was hoping I could get
2 some tips from people here. I recently started trying to separate logs
3 into various functions rather than letting everything go to
4 /var/log/messages. So I created three filters in syslog-ng. One is
5 intended to separate sshd messages, one to separate samba messages, and
6 the other to say "everything ELSE". The problem  I seem to be having is
7 that the everything ELSE log still shows things that should have been
8 removed! For example, when I login via ssh I get identical notification
9 in the /var/log/messages and in /var/sshd/sshd.log. So I'm lost. I'm
10 including my syslog-ng.conf. Perhaps someone here can tell me what I'm
11 doing wrong.
12
13 Thanks!
14
15 ---------- CUT HERE - syslog_ng.conf ----------
16 @version: 3.30
17
18 @include "scl.conf"
19
20 options {
21     threaded(yes);
22     chain_hostnames(no);
23     stats_freq(43200);
24     mark_freq(3600);
25 };
26
27 source src { system(); internal(); };
28
29 filter samba { program("samba"); };
30 filter ssh_messages { facility("AUTH") and level("INFO"); };
31 filter syslog { not filter("ssh_messages") and not filter("samba"); };
32
33 destination console { file("/dev/tty12"); };
34 destination messages { file("/var/log/messages"); };
35 destination sshd_log { file("/var/log/sshd/sshd.log"); };
36 destination smb_logs { file("/var/log/samba/samba.log"); };
37
38 log { source(src); destination(smb_logs); filter(samba); flags(final); );
39 log { source(src); destination(sshd_log); filter(ssh_messages);
40 flags(final); };
41 log { source(src); destination(console); filter(syslog); };
42 log { source(src); destination(messages); filter(syslog); };
43 ---------- CUT HERE --------------

Replies

Subject Author
Re: [gentoo-user] syslog-ng misbehaving Neil Bothwick <neil@××××××××××.uk>