Amin El-Zein
asked on
regex error
Hello,
I want to log all rysylog I configure and everything is fine.
I create a new template that is:
template(name="stdSQLforma t" type="string" option.sql="on" string="insert into SystemEvents (Message, Message2, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%','%msg:R,ERE,0,DFL T,1:([0-9] +\.){3}[0- 9]+[:]?([0 -9]+)?"--e nd%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-mysq l%', '%timegenerated:::date-mys ql%', %iut%, '%syslogtag%')")
but when I run rsyslog I get:
error during parsing file /etc/rsyslog.d/mysql.conf, on or before line 8: invalid character '"' in object definit
I know that the problem is with
%msg:R,ERE,0,DFLT,1:([0-9] +\.){3}[0- 9]+[:]?([0 -9]+)?"--e nd%
but I don't understand what I have to do !
thanks.
I want to log all rysylog I configure and everything is fine.
I create a new template that is:
template(name="stdSQLforma
but when I run rsyslog I get:
error during parsing file /etc/rsyslog.d/mysql.conf,
I know that the problem is with
%msg:R,ERE,0,DFLT,1:([0-9]
but I don't understand what I have to do !
thanks.
ASKER
Hello,
its not working in any case !
its not working in any case !
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
noci you perfect I notice that before one hour of your notice :)
I am trying somting with regex and I will back to you ..
hope if you can help me with this : https://www.experts-exchange.com/questions/29169699/regex-syntax.html ;)
many thanks for your support.
I am trying somting with regex and I will back to you ..
hope if you can help me with this : https://www.experts-exchange.com/questions/29169699/regex-syntax.html ;)
many thanks for your support.
%msg:R,ERE,0,DFLT,1:([0-9]
then try:
%msg:R,ERE,0,DFLT,1:([0-9]
(use an escaped ")
or:
%msg:R,ERE,0,DFLT,1:([0-9]
ignore ".