-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Only initialize service URL once #16044
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ycombinator
added
bug
module
Metricbeat
Metricbeat
[zube]: In Review
Team:Integrations
Label for the Integrations team
Feature:Stack Monitoring
v8.0.0
v7.7.0
v7.6.1
labels
Feb 3, 2020
Pinging @elastic/stack-monitoring (Stack monitoring) |
ycombinator
added
needs_backport
PR is waiting to be backported to other branches.
test-plan
Add this PR to be manual test plan
labels
Feb 3, 2020
ycombinator
force-pushed
the
mb-ls-xp-url-fix
branch
from
February 3, 2020 22:10
f07f5ea
to
a33d60c
Compare
ycombinator
changed the title
Only add vertices param to URL if it doesn't already exist
Only initialize service URL once
Feb 3, 2020
sayden
approved these changes
Feb 4, 2020
Travis CI is green and Jenkins CI failure is unrelated. Merging. |
This was referenced Feb 4, 2020
ycombinator
added a commit
that referenced
this pull request
Feb 5, 2020
ycombinator
added a commit
that referenced
this pull request
Feb 5, 2020
ycombinator
removed
the
needs_backport
PR is waiting to be backported to other branches.
label
Feb 13, 2020
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Feature:Stack Monitoring
Metricbeat
Metricbeat
module
Team:Integrations
Label for the Integrations team
test-plan
Add this PR to be manual test plan
test-plan-added
This PR has been added to the test plan
v7.6.0
v7.7.0
v8.0.0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
It initializes the URL for the Logstash node stats API to be called by the
logstash
module whenxpack.enabled: true
is set exactly once.Why is it important?
Before this fix, the
?vertices=true
query parameter string was getting appended to the Logstash node stats API URL repeatedly, each time thelogstash/node_stats
'sFetch()
method was invoked. This resulted in Logstash eventually returning HTTP 400 responses and Logstash monitoring data not being collected by the Logstash Metricbeat module.Checklist
[ ] 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. There are existing tests that verify correctness of collecting Logstash monitoring data. To test this particular bugfix, manual testing is OK IMO.How to test this PR locally
Run Logstash with a simple pipeline.
Enable the
logstash-xpack
module in Metricbeat.Run Metricbeat.
Open up Wireshark (or similar) and sniff for HTTP traffic on localhost going to port 9600 (the Logstash HTTP API port). Verify that you are seeing calls like
GET /_node/stats?vertices=true
every 10 seconds. Verify that the?vertices=true
query parameter string is not being appended in each iteration. So the first iteration should have exactly one?vertices=true
, as should the second, third, fourth, and so on.Related issues