itamae/cookbooks/fluentd/files/etc/td-agent/conf.d/processor_consul.conf

40 lines
645 B
Plaintext
Raw Normal View History

2019-03-03 08:50:49 +00:00
######################
# Receive nginx logs #
######################
<label @consul_branch>
<match consul>
@type copy
<store>
@type rewrite_tag_filter
<rule>
key message
pattern (\[WARN\]|left, deregistering|removing server monitor)
tag consul.danger
</rule>
</store>
<store>
@type rewrite_tag_filter
<rule>
key message
pattern (\[INFO\])
tag consul.good
</rule>
</store>
</match>
<match consul.danger>
@type relabel
@label @danger
</match>
<match consul.good>
@type relabel
@label @good
</match>
</label>