1. Syslog
LF is "\n"
. The problem here comes from the fact that you are removing linebreaks before generating the syslog. If any of your fields (most importantly $Message
) contain a linebreak it will generate a syslog record with the linebreak. to_syslog_ietf()
does not use $raw_event
, it only generates a syslog record and puts it there.
Changing the order should help:
Exec to_syslog_ietf();
Exec $raw_event = replace($raw_event, "\n", " ");
Exec $raw_event = replace($raw_event, "\r", " ");
Exec $raw_event = replace($raw_event, "\t", " ");
2. Gelf
The problem is caused by the following:
Module om_tcp
OutputType GELF
GELF
is for the gzip compressed format that is for UDP only and does not work with TCP. You need OutputType GELF_TCP
.