I have successfully compiled and installed rsyslog using the --enable-mysql flag, copied the proper init, sysconfig and logrotate scripts to their proper locations. I then created the rsyslog.conf file (below) and started the init script. I can verify that its running by using # ps aux | grep logd.
FILE: /etc/rsyslog.conf
- Code: Select all
$ModLoad MySQL
$template dbFormat,"insert into SystemEvents (Message, Facility,FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%',%syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')",sql
*.* >127.0.0.1,syslog,syslog,syslog;dbFormat
*.* /var/log/rsyslog_debug;dbFormat
With this test case i can see all of the syslog messages going to the rsyslog_debug file in MySQL format.
I have verified the mysql user/pass/db and its permissions. I have also verified running the commands from the log into a mysql terminal with positive results. So it seems that something on the rsyslog/mysql layer that isnt working properly.
Any assistance would be greatly appreciated.


