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

Loosen Nginx error log regex matching #442

Merged
merged 2 commits into from
Sep 13, 2023

Conversation

Leo1003
Copy link
Contributor

@Leo1003 Leo1003 commented Sep 8, 2023

Since the fields can be empty in some circustances, it is better to use '*' instead of '+' to match the values.

Below is an example log from our Nginx container which can fail the parse_nginx_log() finction:

2023/09/08 13:50:28 [warn] 3#3: *531 an upstream response is buffered to a temporary file /var/lib/nginx/tmp/fastcgi/6/03/0000000036 while reading upstream, client: 140.113.168.124, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "duty.cs.nctu.edu.tw", referrer: "https://oauth.cs.nctu.edu.tw/"

Since the fields can be empty in some circustances,
it is better to use '*' instead of '+' to match the values.
@pront
Copy link
Contributor

pront commented Sep 12, 2023

Hi @Leo1003, thanks for submitting this change! Can you please add a test and an entry in the CHANGELOG.md?

@pront pront self-requested a review September 12, 2023 09:21
@Leo1003
Copy link
Contributor Author

Leo1003 commented Sep 13, 2023

I have added a test and an entry in the CHANGELOG

Copy link
Contributor

@pront pront left a comment

Choose a reason for hiding this comment

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

Thank you!

@pront pront added this pull request to the merge queue Sep 13, 2023
Merged via the queue into vectordotdev:main with commit e6ca833 Sep 13, 2023
8 checks passed
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.

2 participants