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

Cherry-pick #8768 to 6.x: Update Filebeat Traefik module to handle mixed Common and Combined Log Format #9419

Merged
merged 3 commits into from
Dec 7, 2018

Conversation

sayden
Copy link
Contributor

@sayden sayden commented Dec 6, 2018

Cherry-pick of PR #8768 to 6.x branch. Original message:

This is a continuation of PRs #6488 and #6136

Previous PR's were misleading because there's no difference between Traefik 1.5 and 1.7 log formats but as you can see in this issue Traefik could miss some quote which would make our parser to fail. So those PR's were to address that issue.

Traefik uses by default since 1.4 version (at least) the Combined Log Format https://httpd.apache.org/docs/trunk/logs.html#combined also used in Apache. In 1.7 it still uses this format but you can also setup Common Log Format or JSON. Maybe we should open an issue to support JSON in the future.

Solves #8015 and #6111

  • frontend_name field was added so Traefik frontend_name is missing #8015 is solved.
  • The Grok pattern have been improved to handle the case of Traefik module for Filebeat is not working as expected #6111 and the log lines described there have been added to the test cases successfully so the issue is also solved.
  • Added user_identifier field which was hardcoded to '-' before
  • Added duration field which was missing too
  • Added request_count field
  • Numeric fields added as string have been converted to long like response_code

…g Format (elastic#8768)

* Added support for Common Log Format and Combined Log Format in Traefik which is the default format until now.
* Added more log lines, including one in Common Log Format
* Added user_identifier field which was hardcoded to '-' before
* Added log test inputs where the user_name and user_identifier were set and not set.
* Added duration field which was missing
* Numeric fields added as string have been converted to long
* Added request count field
* Added two log lines more that covers issue elastic#6111
* Make bytes_sent field of type long. Most Grok expressions are optional now
* Added CHANGELOG entry

(cherry picked from commit 0e9054c)
@ruflin
Copy link
Contributor

ruflin commented Dec 7, 2018

CI failure seems to be related. It could be that it's related to a different Geoip processor in Elasticsearch 6.x. Try to run make start in this branch and generate the test outputs again.

Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

Waiting for CI to go green.

@sayden
Copy link
Contributor Author

sayden commented Dec 7, 2018

jenkins, test this

@sayden sayden merged commit 14a2fe3 into elastic:6.x Dec 7, 2018
@sayden sayden deleted the backport_8768_6.x branch October 29, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants