-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Description
I expected the following logparser config to create a port tag and packets, bytes as integer fields. But instead I got three string fields and no tags:
[[inputs.logparser]]
files = ["/var/lib/pmacct/in_port.txt"]
from_beginning = true
[inputs.logparser.grok]
patterns = ["%{NONNEGINT:port:tag},%{NONNEGINT:packets:int},%{NONNEGINT:bytes:int}"]
This config on the other hand worked, which uses the custom_patterns config option.
[[inputs.logparser]]
files = ["/var/lib/pmacct/in_port.txt"]
from_beginning = true
[inputs.logparser.grok]
measurement = "net_in_port"
patterns = ["%{CSV_PORT}"]
custom_patterns = '''
CSV_PORT %{NONNEGINT:port:tag},%{NONNEGINT:packets:int},%{NONNEGINT:bytes:int}
'''
Either the patterns config needs to error if the patterns contain modifiers or they need to work.
Version: 1.0.0-beta2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels