rewrite_tag_filter
How It Works
Example
Basic Example
<match app.component>
@type rewrite_tag_filter
<rule>
key message
pattern /^\[(\w+)\]/
tag $1.${tag}
</rule>
</match>+------------------------------------------+ +------------------------------------------------+
| original record | | rewritten tag record |
|------------------------------------------| |------------------------------------------------|
| app.component {"message":"[info]: ..."} | +----> | info.app.component {"message":"[info]: ..."} |
| app.component {"message":"[warn]: ..."} | +----> | warn.app.component {"message":"[warn]: ..."} |
| app.component {"message":"[crit]: ..."} | +----> | crit.app.component {"message":"[crit]: ..."} |
| app.component {"message":"[alert]: ..."} | +----> | alert.app.component {"message":"[alert]: ..."} |
+------------------------------------------+ +------------------------------------------------+Nested kubernetes namespace attributes based rules
Installation
Configuration Example
Parameters
rewriteruleN
rewriteruleNcapitalize_regex_backreference
capitalize_regex_backreferencetype
default
version
hostname_command
hostname_commandtype
default
version
<rule> Section
<rule> Sectionkey
keytype
default
version
pattern
patterntype
default
version
tag
tagtype
default
version
invert** (bool) (optional):
invert** (bool) (optional):type
default
version
Placeholders
Use Cases
Aggregate + display 404 status pages by URL and referrer to find and fix dead links.
Send an IRC alert for 5xx status codes on exceeding thresholds.
FAQ
With rewrite-tag-filter, logs are not forwarded. Why?
rewrite-tag-filter, logs are not forwarded. Why?Last updated
Was this helpful?