[rsyslog] Asterisk log into rsyslog mysql backend with double quotes

Marc Leurent lftsy at leurent.eu
Thu Aug 13 17:27:51 CEST 2009


Hello, I was using rsyslog 4.2.0-1 on a Debian Squeeze server!
I have backported the rsyslog 3.18.6-4 version and the logging of message with double quotes into mysql database is working.
So I think that is a bug with the 4.2.0-1 version

How can I help filling a bug report?
Thanks
-- 
-- --
Marc LEURENT
lftsy at leurent.eu

Le mercredi, 12 août 2009 21.49:16, Rainer Gerhards a écrit :
> Not sure if i can look at this the next days (i have limited email only
> connnectivity...), but this looks somewhat strange. Please try to get a
> error message, maybe via running in debug mode.
>
> ----- Ursprüngliche Nachricht -----
> Von: "Marc Leurent" <lftsy at leurent.eu>
> An: "rsyslog at lists.adiscon.com" <rsyslog at lists.adiscon.com>
> Gesendet: 12.08.09 19:12
> Betreff: [rsyslog] Asterisk log into rsyslog mysql backend with double
> quotes
>
> Good evening,
> I have a simple problem and I would be very grateful if you could help me,
> I'm trying to put Asterisk logs into a MySQL database using the powerful
> rsyslog!
> It's working, except when Asterisk generates syslog message with double
> quotes!
>
> So my Asterisk server is logging to syslog.local0 into rsyslog
> and with the config below, I put the logs into a mysql database!
>
> 	$template bobsql,"INSERT INTO log (server, date, heure, message) VALUES
> ('%HOSTNAME%', DATE(%timereported:::date-mysql%),
> TIME(%timereported:::date-mysql%), '%msg%')",SQL
> 	local0.* :ommysql:localhost,asterisk_db,asterisk,bob;bobsql
>
>
> It adds any line except when the %msg% contains a double quote like this
> one: NOTICE[25608] chan_sip.c: Registration from '"1001"
> <sip:1001 at leurent.eu>' failed for '88.191.80.8' - Wrong password
>
> Could you explain me what I should change to be able to put double quote in
> the database. Thanks!




More information about the rsyslog mailing list