FS#5997 - [syslog-ng 2.0.0] iptables logs are found in /var/log/kernel.log

Attached to Project: Arch Linux
Opened by solsTiCe (zebul666) - Tuesday, 12 December 2006, 18:56 GMT
Last edited by Tobias Powalowski (tpowa) - Thursday, 25 October 2007, 10:06 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Powalowski (tpowa)
Architecture All
Severity Low
Priority Normal
Reported Version 0.7.2 Gimmick
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

hi.
with the previous syslog-ng 1.6.10 and the new 2.0.0, i got iptables log in /var/log/kernel.log.

but i except them to be only in /var/log/iptables.log and not in both iptables.log and kernel.log.
is it a matter of taste ?

so i changed my syslog-ng.conf
line 49 to this :
filter f_kernel { facility(kern) and not match("IN=.*OUT="); };

that expression "match('IN.*OUT=") appears now in 3 places in syslog-ng.conf. may be there is some better to filter iptables log ? by default they came from kernel facility at info level ?
p.s.:

i wonder why cron messages are included in messages.log while they are already logged in crond.log ! duplicate log then again !

line 57 of syslog-ng.conf could be changed to
filter f_messages { level(info..warn) and not facility(auth, authpriv, mail, news, cron) and not program(syslog-ng) and not match("IN=.*OUT="); };

do as you wish ! :-)
This task depends upon

Closed by  Tobias Powalowski (tpowa)
Thursday, 25 October 2007, 10:06 GMT
Reason for closing:  Fixed
Additional comments about closing:  syslog-ng-2.0.5-4
Comment by Attila (attila) - Wednesday, 13 December 2006, 09:06 GMT
My suggestion is to use "not filter(f_iptables)" instead of repeating the same rules at more than one place so at example the line 49 looks so:

filter f_kernel { facility(kern) and not filter(f_iptables); };
Comment by solsTiCe (zebul666) - Wednesday, 13 December 2006, 16:36 GMT
i am using your suggestion for line 49 and 57 and it works nice here.
Comment by Dawid Wróbel (cromo) - Wednesday, 13 December 2006, 18:02 GMT
I on the other hand experience such entry each 10 mins in everything.log:

Dec 13 18:45:54 kromka syslog-ng[22569]: Log statistics; processed='center(queued)=145', processed='center(received)=52', processed='destination(console)=0', processed='destination(mail)=0', processed='destination(user)=0', processed='destination(uucp)=0', processed='destination(messages)=21', processed='destination(news)=0', processed='destination(iptables)=0', processed='destination(everything)=52', processed='destination(lpr)=0', processed='destination(cron)=0', processed='destination(syslog)=11', processed='destination(authlog)=0', processed='destination(errors)=20', processed='destination(kernel)=35', processed='destination(daemon)=6', processed='source(src)=52'

This renders the log file unreadable, not mentioning the quick increase of log file size.
Comment by Jens Adam (byte) - Wednesday, 13 December 2006, 18:50 GMT
cromo: exclude the internal messages from everything.log and/or increase stats_freq().
See http://www.balabit.com/products/syslog_ng/reference-2.0/syslog-ng.html/index.html for syntax.

I'm very slowly beginning to read up on syslog-ng and I think our default config is far from perfect.
The chapter about pipe() (see the link above) for example even warns about using 'pipe("/proc/kmsg")'
Comment by Attila (attila) - Wednesday, 13 December 2006, 18:52 GMT
Have attention this is only a suspicion of mine because i don't know exactly from where this statistics comes:

Could it be that you have a "stats(600)" in the options group of your syslog-ng.conf? If yes, than comment it out for a try to see what happens.
Comment by Jens Adam (byte) - Wednesday, 13 December 2006, 18:58 GMT
It's simply the default setting, just that with 2.0 the format has changed. Formerly it was just a tiny "STATS: dropped 0" line.
Comment by Roman Kyrylych (Romashka) - Monday, 10 September 2007, 09:12 GMT
Can this be closed?
Comment by Dawid Wróbel (cromo) - Friday, 28 September 2007, 20:38 GMT
At least my issue seems fixed.

Loading...