syslog
The syslog
parser plugin parses syslog generated logs. This plugin supports two RFC formats, rfc3164 and rfc5424.
Parameters
time_format
Specify time format for event time. Default is "%b %d %H:%M:%S" for rfc3164 protocol.
message_format
Specify protocol format. Supported values are rfc3164
, rfc5424
and auto
. Default is rfc3164
. If your syslog uses rfc5424
, use rfc5424
instead.
auto
is useful when this parser receives both rfc3164
and rfc5424
message. syslog
parser detects message format by using message prefix.
This parameter is used inside in_syslog
plugin because the file logs via syslog don't have <9>
like priority prefix.
with_priority
If the incoming logs have priority prefix, e.g. \, set true
. Default is false
.
keep_time_key
If you want to keep time field in the record, set true
. Default is false
.
Regexp patterns
rfc3164 pattern
pri
, host
, ident
, pid
and message
are included in the event record. time
is used for the event time.
pri
value is converted into integer type.
If with_priority
is false
, ^\<(?<pri>[0-9]+)\>
is removed from the pattern.
rfc5424 pattern
pri
, host
, ident
, pid
, msgid
, extradata
and message
are included in the event record. time
is used for the event time.
pri
value is converted into integer type.
Example
rfc3164 log
This incoming event is parsed as:
rfc5424 log
This incoming event is parsed as:
If this article is incorrect or outdated, or omits critical information, please let us know. Fluentd is a open source project under Cloud Native Computing Foundation (CNCF). All components are available under the Apache 2 License.
Last updated