On 8/17/07, Balazs Scheidler <bazsi@balabit.hu> wrote:
On Fri, 2007-08-17 at 10:39 +0200, Andreas Kurz wrote:
Hello all,
I've installed syslog-ng 2.0.5 (compiled from src) on a CentOS 4.5 server and wanted to include a MySQL logfile via a file() source directive: ... source s_db_com { file("/var/lib/mysql/community/community.err" log_prefix("mysql-community: ") follow_freq(1) flags(no-parse)); }; filter f_db_com { match("mysql-community"); }; log { source(s_db_com); filter(f_db_com); destination(ha_local6); destination(ha_tcp); flags(final); }; ..
But when I restart syslog-ng the complete MySQL error file is read and logged again by syslog-ng. Is there a special option that has to be set to get this feature working? Where does syslog-ng store its persistant data to get the information after a restart?
syslog-ng is supposed to store this information in /var/lib/syslog-ng/syslog-ng.persist, but the exact filename might also depend on your configuration options.
Can you check if saving this file was successful?
The localstatedir is not created automatically by the rpm installation ... directory created, syslog-ng restarted, works! Thanks for your help Bazsi, Regards, Andreas
You don't need to do anything else, it should be automatic.
-- Bazsi