Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifiers are not honored in patterns config option #1436

Closed
nathanielc opened this issue Jul 1, 2016 · 0 comments · Fixed by #1512
Closed

Modifiers are not honored in patterns config option #1436

nathanielc opened this issue Jul 1, 2016 · 0 comments · Fixed by #1512

Comments

@nathanielc
Copy link
Contributor

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

@nathanielc nathanielc changed the title Modifies are not honored in patterns config option Modifiers are not honored in patterns config option Jul 1, 2016
sparrc added a commit that referenced this issue Jul 18, 2016
closes #1436

This also fixes the bad behavior of waiting until runtime to return log
parsing pattern compile errors when a pattern was simply unfound.
sparrc added a commit that referenced this issue Jul 18, 2016
closes #1436

This also fixes the bad behavior of waiting until runtime to return log
parsing pattern compile errors when a pattern was simply unfound.
sparrc added a commit that referenced this issue Jul 18, 2016
closes #1436

This also fixes the bad behavior of waiting until runtime to return log
parsing pattern compile errors when a pattern was simply unfound.
sparrc added a commit that referenced this issue Jul 18, 2016
closes #1436

This also fixes the bad behavior of waiting until runtime to return log
parsing pattern compile errors when a pattern was simply unfound.

closes #1418

Also protect against user error when the telegraf user does not have
permission to open the provided file. We will now error and exit in this
case, rather than silently waiting to get permission to open it.
sparrc added a commit that referenced this issue Jul 18, 2016
closes #1436

This also fixes the bad behavior of waiting until runtime to return log
parsing pattern compile errors when a pattern was simply unfound.

closes #1418

Also protect against user error when the telegraf user does not have
permission to open the provided file. We will now error and exit in this
case, rather than silently waiting to get permission to open it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant