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: allow numbers in ident & auth parameters #1864

Merged
merged 1 commit into from
Oct 10, 2016
Merged

logparser: allow numbers in ident & auth parameters #1864

merged 1 commit into from
Oct 10, 2016

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Oct 7, 2016

Required for all PRs:

  • CHANGELOG.md updated (we recommend not updating this until the PR has been approved by a maintainer)
  • Sign CLA (if not already signed)
  • README.md updated (if adding a new plugin)

fixes #1810

@@ -53,7 +53,7 @@ RESPONSE_TIME %{DURATION:response_time_ns:duration}
EXAMPLE_LOG \[%{HTTPDATE:ts:ts-httpd}\] %{NUMBER:myfloat:float} %{RESPONSE_CODE} %{IPORHOST:clientip} %{RESPONSE_TIME}

# Wider-ranging username matching vs. logstash built-in %{USER}
NGUSERNAME [a-zA-Z\.\@\-\+_%]+
NGUSERNAME [a-zA-Z0-9\.\@\-\+_%]+
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, if the field is delimited by spaces, why not match any non-space character?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no particular reason, I'm just following logstash's example: https://github.com/elastic/logstash/blob/v1.4.2/patterns/grok-patterns#L1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed the COMMON LOG FORMAT pattern to match NOTSPACE for ident and auth. I wasn't able to find any information regarding character limitations on these. It appears that even whitespace is allowed based on #1810, but hopefully it's not very common.

@sparrc sparrc force-pushed the cs1810 branch 3 times, most recently from 2739600 to b768234 Compare October 10, 2016 10:27
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 this pull request may close these issues.

Logparser common log format error (nginx/apache)
2 participants