-
I'm running the following configuration: Fluentd is deployed as a syslog receiver for multiple client systems that have configured their syslogd to simply forward all messages to a
Now I wish to begin to parse a number of these log types in Fluentd prior to forwarding them. A small portion of the logs will be parsed to fields (filter, with parser of type regexp) and then forwarded, and all of the rest of the logs that aren't parsed should simply be forwarded. What is the correct pattern for this? If I try implementing a filter section in the pipeline I can successfully parse and forward the logs I explicitly parse, but all other logs are dropped with a ParserError:
I can isolate the syslog events I want to parse by matching on their tag ( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I prototyped the below, based on out_rewrite_tag_filter:
This meets the requirements as it allows specific events to be parsed while others fall through, and all are picked up by the output. It doesn't preserve the original tags (for syslog input, the facility and priority) and I imagine there are ways this can be improved. |
Beta Was this translation helpful? Give feedback.
-
Yes, this is the common way to do this. You use
Another approach is to use <match **>
@type copy
<store>
@type relabel
@label @filtered
</store>
<store>
@type relabel
@label @original
</store>
</match>
<label @filtered>
...
</label>
<label @original>
...
</label> |
Beta Was this translation helpful? Give feedback.
I prototyped the below, based on out_rewrite_tag_filter: