On Wed, 2009-03-04 at 02:59 +0100, gatfi sami wrote:
Hi
it is me again
no one had answered my previous questions until now but i 'll never loose hope so here is another one
I am killing my self to add a file as a source driver in syslog-ng
repeat i installed 1.6.12-76.2 in open suse 11.0
i used source my_src {
#internal();
#file("/var/log/apache2/error_log"); #perm(0666);
#unix-dgram("/dev/log"); see i tried alot of thing before i asked you file("/var/lib/mysql/mysqld.log");
}; and here is the error
Shutting down syslog services done Re-Starting syslog servicesError opening file /var/lib/mysql/mysqld.log for reading (Permission denied) Error initializing configuration, exiting.
I also tried to change the file's permission
by the way
is this the best way to log mysql arror log to a syslog client
Well, you have to give permission to syslog-ng to read files you instruct it to read. You probably have an AppArmor issue (which adds further restrictions over standard UNIX rights). Try disabling apparmor and see if syslog-ng is able to read the file. (or instruct AppArmor that syslog-ng should be able to open it) Also, 1.6.x's file source was rather limited, for instance it couldn't remember the file position accross restarts. 2.1.x should be better in this regard. -- Bazsi