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

Add Traefik json log support #358

Merged
merged 6 commits into from
Sep 7, 2023
Merged

Conversation

sethlinnkuleuven
Copy link
Contributor

Description:

This builds on pull request #322 (which can be deleted if this is accepted) This pull request adds support for the Traefik json log format, not to be confused with the Traefik common log.

What was done:

  1. Expanded import_logs.py to auto recognize and import Traefik json log files.
  2. Modified the NGINX json support, made the 'check_format_line' function more specific. It was to generic. All json formatted logs were autodetected as NGINX logs.
  3. Added tests for Traefik log importing.

davaxi and others added 5 commits October 21, 2021 15:34
What was done:
1. Expanded import_logs.py to auto recognize and import Traefik json log files.
2. Modified the NGINX json support, made the autodetect function more specific. It was to generic. All json formatted logs where seen as NGINX logs.
3. Added tests for Traefik log importing.
What was done:
* The get_all method was returning the raw json without any key mapping. Fixed that. This meant also changing the names in test_main.yml
* changed log file form CLF to LF
@sgiehl
Copy link
Member

sgiehl commented Sep 6, 2023

@sethlinnkuleuven I've fixed the test action to run correctly again. Would you mind pulling in the latest changes, so we can see if they pass here?

@sethlinnkuleuven
Copy link
Contributor Author

Ok, I pulled your changes, lets have another run. Thanks!

@sgiehl sgiehl mentioned this pull request Sep 7, 2023
11 tasks
Copy link
Member

@sgiehl sgiehl left a comment

Choose a reason for hiding this comment

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

Looks good to me. Tests are passing, so should be good to go.
Thanks for the contribution @sethlinnkuleuven

@sgiehl sgiehl merged commit 4d87cd0 into matomo-org:4.x-dev Sep 7, 2023
6 checks passed
sgiehl pushed a commit that referenced this pull request Oct 2, 2023
* Add Traefik JSON log format

* Add Traefik JSON log format

* Add Traefik json log support.

What was done:
1. Expanded import_logs.py to auto recognize and import Traefik json log files.
2. Modified the NGINX json support, made the autodetect function more specific. It was to generic. All json formatted logs where seen as NGINX logs.
3. Added tests for Traefik log importing.

* Fixed failing tests and refactored get_all method

What was done:
* The get_all method was returning the raw json without any key mapping. Fixed that. This meant also changing the names in test_main.yml
* changed log file form CLF to LF

---------

Co-authored-by: David Patiashvili <stratagem.david@gmail.com>
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.

3 participants