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

Logparser patterns cannot contain newlines #4004

Closed
danielnelson opened this issue Apr 10, 2018 · 0 comments · Fixed by #4005
Closed

Logparser patterns cannot contain newlines #4004

danielnelson opened this issue Apr 10, 2018 · 0 comments · Fixed by #4005
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@danielnelson
Copy link
Contributor

Bug report

Despite being documented as working, you cannot use newlines in the pattern field of logparser

Relevant telegraf.conf:

[[inputs.logparser]]
  files = ["/var/log/auth.log"]
  from_beginning = false
  watch_method = "inotify"
  [inputs.logparser.grok]
    patterns = ['''
        %{SYSLOGTIMESTAMP:timestamp}
    ''']

System info:

Telegraf 1.5.3

Steps to reproduce:

  1. Using configuration above parse this data:
    Apr 10 05:11:57
    

Expected behavior:

Line is parsed

Actual behavior:

Line is not matched

Additional info:

Will parse if whitespace is removed:

patterns = ['''%{SYSLOGTIMESTAMP:timestamp}''']
@danielnelson danielnelson added the bug unexpected problem or unintended behavior label Apr 10, 2018
@danielnelson danielnelson added this to the 1.6.0 milestone Apr 10, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant