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

filebeat/module/nginx/ingress_controller: Add parsing if one of upstreams fails to return response #34787

Merged
merged 7 commits into from
Apr 3, 2023

Conversation

leweafan
Copy link
Contributor

@leweafan leweafan commented Mar 9, 2023

What does this PR do?

Adds nginx ingress_controller parsing if one of upstreams fails to return response cause of timeout

Why is it important?

Nginx logs should be parsed even one of upstreams fails to return response cause of timeout.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@leweafan leweafan requested a review from a team as a code owner March 9, 2023 16:35
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Mar 9, 2023
@mergify
Copy link
Contributor

mergify bot commented Mar 9, 2023

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @leweafan? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@elasticmachine
Copy link
Collaborator

elasticmachine commented Mar 9, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-03-29T11:39:28.431+0000

  • Duration: 68 min 44 sec

Test stats 🧪

Test Results
Failed 0
Passed 7585
Skipped 747
Total 8332

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@leweafan
Copy link
Contributor Author

leweafan commented Mar 9, 2023

@tetianakravchenko can I ask you to help with this PR :)

@mergify
Copy link
Contributor

mergify bot commented Mar 16, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b nginx_ingress_controller upstream/nginx_ingress_controller
git merge upstream/main
git push upstream nginx_ingress_controller

@tetianakravchenko tetianakravchenko requested review from a team, gizas, tetianakravchenko and gsantoro and removed request for a team March 27, 2023 12:57
@mergify
Copy link
Contributor

mergify bot commented Mar 28, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b nginx_ingress_controller upstream/nginx_ingress_controller
git merge upstream/main
git push upstream nginx_ingress_controller

@mergify
Copy link
Contributor

mergify bot commented Mar 29, 2023

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b nginx_ingress_controller upstream/nginx_ingress_controller
git merge upstream/main
git push upstream nginx_ingress_controller

Copy link
Contributor

@tetianakravchenko tetianakravchenko 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 for the contribution!

@@ -17,16 +17,16 @@ processors:
"(-|%{DATA:http.request.referrer})" "(-|%{DATA:user_agent.original})" %{NUMBER:nginx.ingress_controller.http.request.length:long}
%{NUMBER:nginx.ingress_controller.http.request.time:double} \[%{DATA:nginx.ingress_controller.upstream.name}\]
\[%{DATA:nginx.ingress_controller.upstream.alternative_name}\] (%{UPSTREAM_ADDRESS_LIST:nginx.ingress_controller.upstream_address_list}|-)
(%{UPSTREAM_RESPONSE_LENGTH_LIST:nginx.ingress_controller.upstream.response.length_list}|-) (%{UPSTREAM_RESPONSE_TIME_LIST:nginx.ingress_controller.upstream.response.time_list}|-)
(%{UPSTREAM_RESPONSE_STATUS_CODE_LIST:nginx.ingress_controller.upstream.response.status_code_list}|-) %{GREEDYDATA:nginx.ingress_controller.http.request.id}
(%{UPSTREAM_RESPONSE_LENGTH_LIST:nginx.ingress_controller.upstream.response.length_list}|-) (-|%{UPSTREAM_RESPONSE_TIME_LIST:nginx.ingress_controller.upstream.response.time_list})
Copy link
Contributor

Choose a reason for hiding this comment

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

could you explain why it was needed to change order here?

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 really don't remember. I've made test and it works if we change it.

@tetianakravchenko tetianakravchenko added the Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team label Mar 29, 2023
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Mar 29, 2023
@tetianakravchenko tetianakravchenko merged commit 324aae0 into elastic:main Apr 3, 2023
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
…eams fails to return response (#34787)

* Add nginx ingress_controller parsing if one of upstreams fails to return response cause of timeout

* added pull id

---------

Co-authored-by: Tetiana Kravchenko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Cloudnative-Monitoring Label for the Cloud Native Monitoring team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nginx ingress_controller pipeline can not parse message if a second upstream fails to return response
4 participants