Only initialize service URL once#16044
Merged
ycombinator merged 3 commits intoelastic:masterfrom Feb 4, 2020
ycombinator:mb-ls-xp-url-fix
Merged
Only initialize service URL once#16044ycombinator merged 3 commits intoelastic:masterfrom ycombinator:mb-ls-xp-url-fix
ycombinator merged 3 commits intoelastic:masterfrom
ycombinator:mb-ls-xp-url-fix
Conversation
Contributor
|
Pinging @elastic/stack-monitoring (Stack monitoring) |
sayden
approved these changes
Feb 4, 2020
Contributor
Author
|
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
6 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
logstashmodule whenxpack.enabled: trueis set exactly once.Why is it important?
Before this fix, the
?vertices=truequery 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-xpackmodule 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=trueevery 10 seconds. Verify that the?vertices=truequery 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