problem with syslog-ng

problem with syslog-ng

Post by scot » Fri, 08 Nov 2002 04:36:53



I am having an issue with my syslog-ng. I recently installed syslog-ng
version 1.5.19 and configured it with the following configuration (at end
of post).

It should read from /dev/log and /proc/kmsg and then filter them
accordingly. Unfortunately I noticed that sometimes it freezes up and needs
to be restarted. In my firewall log (everything that iptables outputs) I
noticed 2 hours without anything in the log, which is impossible. I also
noticed garbled lines that dmesg shows correctly. Here is an example:


Restarting syslog-ng usually solves that problem.

So, my question is, how do I fix syslog-ng? Or should I use klog with some
options set so that all messages are logged.

Thanks,
Scott

# Global Options
options { sync( 0 ); mark( 600 ); };

# Valid sources are /dev/log and the kernel
source src { unix-stream( "/dev/log" ); file( "/proc/kmsg" ); internal(); };

# Create output destinations
destination mailfile { file( "/var/log/maillog-ng" ); }; # Put mail stuff here
destination messages { file( "/var/log/messages-ng" ); }; #system stuff here
destination firewall { file( "/var/log/firewall-ng" ); }; #Firewall stuff

# handle mail messages imap and sendmail are the only ones used right now
filter mail { match( "sendmail" ) or match( "imapd" ); };
filter notmail { not match( "imapd" ) and not match( "sendmail" ); };

# filter fireall log stuff
filter firewall { match( "firewall:" ); };
filter notfirewall { not match( "firewall:" ); };

# Log the mail stuff to the mail file
log { source( src ); filter( mail ); destination( mailfile ); };

# Log the firewall stuff to the firewall log
log { source( src ); filter( firewall ); destination( firewall ); };
# Do not log mail stuff to messages, do not log camera stuff either
log { source( src ); filter( notmail ); filter( notfirewall ); destination( mess
ages ); };

 
 
 

1. syslog-ng and iptables

I am having some problems with my syslog-ng server and logging messages
produced by iptables. I have IP tables set up with some LOG lines similar
to:
        iptables -A INPUT -j LOG --log-prefix "firewall: INPUT: "
which should log everything that my input table decides to drop (it is the
last rule in the chain).

My syslog-ng config file is posted at the end of this message. I have it
set up to receive kernel messages as well and have turned klogd off. The
problem is that I get wierd entries in messages-ng. They look like they are
part of the output from my iptables LOG


Looking at firewall-ng the rest of the message is in there:


Most of my firewall output is OK. Only a few lines get split and have
problems like this. Does anybody know why this happens, and how to stop the
splitting. Should I stop syslog-ng from reading kernel messages and just
use klogd?

Thanks,
Scott

# Global Options
options { sync( 0 ); mark( 600 ); };

# Valid sources are /dev/log and the kernel
source src { unix-stream( "/dev/log" ); file( "/proc/kmsg" ); internal(); };

# Create output destinations
destination mailfile { file( "/var/log/maillog-ng" ); }; # Put mail stuff here
destination messages { file( "/var/log/messages-ng" ); }; #system stuff here
destination firewall { file( "/var/log/firewall-ng" ); }; #Firewall stuff

# handle mail messages imap and sendmail are the only ones used right now
filter mail { match( "sendmail" ) or match( "imapd" ); };
filter notmail { not match( "imapd" ) and not match( "sendmail" ); };

# filter fireall log stuff
filter firewall { match( "firewall:" ); };
filter notfirewall { not match( "firewall:" ); };

# Log the mail stuff to the mail file
log { source( src ); filter( mail ); destination( mailfile ); };

# Log the firewall stuff to the firewall log
log { source( src ); filter( firewall ); destination( firewall ); };
# Do not log mail stuff to messages, do not log camera stuff either
log { source( src ); filter( notmail ); filter( notfirewall ); destination( mess
ages ); };

2. print server

3. syslog-ng example?

4. Problem C : acces variables env for all process

5. Minilogd and Syslog-NG

6. regexp-able syslogd

7. Syslog-ng by BalaBit

8. newbie needs help puting linux on compactflash

9. iptables + syslog-ng

10. linux 2.4.19-rc3, snat, and syslog-ng strangenesses

11. syslog-ng help

12. Logging everything with Syslog-ng ???

13. Syslog-ng