by noggin143 on Mon Mar 03, 2008 9:26 pm
I've got the regular expressions to work. However, what I would like is
If the string does not appear in the syslog message, a NULL value is inserted into the database. If the string does appear, the value is inserted.
What I currently get is that if the value does not appear, I get '***NO MATCH***' inserted.
Is there a way to override the default behaviour and insert NULL ? The code seemed pretty hard-coded.
For reference, my template line is
$template tapelog,"insert into tapelog(host, facility, priority, tag, datetime, program, msg,vid) values ('%HOSTNAME%', %syslogfacility%, %syslogpriority%, '%syslogtag%', '%timegenerated:::date-rfc3339%', '%programname%', '%msg%','%msg:R:VID=\([^ ]*\)--end%')", stdSQL