Unable to get MySQL logging with rsyslog-1.19.10

This is the place for you, if you got rsyslog up and running but wonder how to make it do what you want.

Moderator: rgerhards

Unable to get MySQL logging with rsyslog-1.19.10

Postby JeffreyDS on Sat Nov 03, 2007 11:17 pm

I have been unsuccessful in getting rsyslog-1.19.10 to write to mysql.

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.
JeffreyDS
New
 
Posts: 1
Joined: Sat Nov 03, 2007 9:55 pm

Postby WolfAngel on Sat Nov 17, 2007 6:02 pm

I'm having the same problem.

I'm running CentOS 5 x86_64 \w kernel 2.6.18-8.1.15.el5
I've checked the password for mysql, and it works fine.

FILE : /etc/rsyslog.conf
Code: Select all
$ModLoad MySQL
*.*     >127.0.0.1,syslog,syslogwriter,CENSORED;


any help would do.
WolfAngel
New
 
Posts: 1
Joined: Sat Nov 17, 2007 5:56 pm

Postby rgerhards on Sat Nov 17, 2007 6:03 pm

Oops, sorry, I seem to have overlooked the initial message. Could you please run rsyslogd in debug mode -d -n and provide me a copy of stdout.

Thanks,
Rainer
User avatar
rgerhards
Site Admin
 
Posts: 1067
Joined: Thu Feb 13, 2003 11:57 am

Google Ads



Return to Configuration

Who is online

Users browsing this forum: No registered users and 0 guests

cron