summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-04-05 18:49:15 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-04-05 18:49:15 +0200
commitd91af378bd69e36dc1e76c4bfcf78c6fe33ba355 (patch)
tree9b73d67e7b192f6a294d6c97ee291baee7069ce2 /runtime
parent24179166f748464f4d556a80bd0c8dcc4cbd57b0 (diff)
downloadrsyslog-d91af378bd69e36dc1e76c4bfcf78c6fe33ba355.tar.gz
rsyslog-d91af378bd69e36dc1e76c4bfcf78c6fe33ba355.tar.xz
rsyslog-d91af378bd69e36dc1e76c4bfcf78c6fe33ba355.zip
omelasticsearch: used new property replacer options for default template
makes JSON creation far more bulletproof (and also faster)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/rsconf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c
index ed61e65e..ff9e1291 100644
--- a/runtime/rsconf.c
+++ b/runtime/rsconf.c
@@ -93,7 +93,7 @@ static uchar template_StdUsrMsgFmt[] = "\" %syslogtag%%msg%\n\r\"";
static uchar template_StdDBFmt[] = "\"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";
static uchar template_StdPgSQLFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-pgsql%', '%timegenerated:::date-pgsql%', %iut%, '%syslogtag%')\",STDSQL";
static uchar template_spoofadr[] = "\"%fromhost-ip%\"";
-static uchar template_StdJSONFmt[] = "\"{\\\"message\\\":\\\"%msg%\\\",\\\"fromhost\\\":\\\"%HOSTNAME%\\\",\\\"facility\\\":\\\"%syslogfacility-text%\\\",\\\"priority\\\":\\\"%syslogpriority-text%\\\",\\\"timereported\\\":\\\"%timereported:::date-rfc3339%\\\",\\\"timegenerated\\\":\\\"%timegenerated:::date-rfc3339%\\\"}\",JSON";
+static uchar template_StdJSONFmt[] = "\"{\\\"message\\\":\\\"%msg:::json%\\\",\\\"fromhost\\\":\\\"%HOSTNAME:::json%\\\",\\\"facility\\\":\\\"%syslogfacility-text%\\\",\\\"priority\\\":\\\"%syslogpriority-text%\\\",\\\"timereported\\\":\\\"%timereported:::date-rfc3339%\\\",\\\"timegenerated\\\":\\\"%timegenerated:::date-rfc3339%\\\"}\"";
/* end templates */
void cnfDoCfsysline(char *ln);