jdenver47

- Newbie
- Posts: 2
-
|
 |
syslog-ng on AIX
|
I have a server running AIX 5.3 and I have installed syslog-ng and Mysql on it. I want to send syslog-ng messages to mysql database. But Its not working. Here is my syslog-ng.conf file
# # sample configuration file for syslog-ng on AIX # users should customize to fit their needs #
# log syslog-ng's own messages to /var/log/syslog-ng.log
source s_internal { internal(); };
destination d_syslognglog { file("/var/log/syslog-ng.log" owner("root") group("adm") perm(0640)); };
log { source(s_internal); destination(d_syslognglog); };
# log everything to /var/log/messages
source s_local { unix-dgram("/dev/log"); };
destination d_messages { file("/var/log/messages" owner("root") group("adm") perm(0640)); };
log { source(s_local); destination(d_messages); };
# Configure syslog-ng to log to mysql database using fifo template
destination d_mysql { pipe("/tmp/mysql.pipe" template("INSERT INTO logs (host, facility, priority, level, tag, date, time, program, msg) VALUES ( '$HOST', '$FACILITY', '$PRIORITY', '$LEVEL','$TAG', '$YEAR-$MONTH-$DAY', '$HOUR:$MIN:$SEC', '$PROGRAM', '$MSG' );\n") template-escape(yes)); };
log { source(s_local); destination(d_mysql); };
#source src { unix-stream("/dev/log"); internal(); }; #source net { udp(); }; # #
After making the necessary modifications I have restarted syslog-ng and here is the script I am running to pipe the messages
#!/usr/bin/ksh
if [ -e /tmp/mysql.pipe ]; then while [ -e /tmp/mysql.pipe ] do /usr/local/mysql/bin/mysql -u root --password=start123 syslog < /tmp/mysql.pipe done else mkfifo /tmp/mysql.pipe fi
I AM NOT ABLE TO FIGURE OUT THE ISSUE....
|