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:[email protected]>' 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!
--
-- --
Marc LEURENT
[email protected]
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com