-
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
Monitoring: only include X-Pack API params when appropriate #18787
Conversation
Pinging @elastic/integrations (Team:Integrations) |
💚 Build SucceededExpand to view the summary
Build stats
Test stats 🧪
Steps errorsExpand to view the steps failures
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What does this PR do?
This PR fixes the Elasticsearch monitoring reporter in libbeat to only include the
system_id
andsystem_api_version
query string parameters in Elasticsearch API requests IF the Beat is sending its monitoring data to the custom X-Pack Monitoring API endpoint (/_monitoring/bulk
). Otherwise, these parameters are not included.Why is it important?
A Beat can be configured to send its monitoring data to Elasticsearch in two ways:
xpack.monitoring.*
settings. This causes the Beat to talk to the custom X-Pack Monitoring API endpoint (/_monitoring/bulk
). This endpoint expects thesystem_id
andsystem_api_version
query string parameters.monitoring.*
settings. This causes the Beat to talk to the generic Bulk API endpoint (/_bulk
). This endpoint does not expect thesystem_id
orsystem_api_version
query string parameters.It turns out that, after the fix made in #18326, the Elasticsearch monitoring reporter in libbeat was always sending the
system_id
andsystem_api_version
query string parameters, regardless of which way a Beat was sending its monitoring data to Elasticsearch. This PR fixes this issue.Checklist
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesI have added an entry inNot sure we need a CHANGELOG entry as this bug was not exposed until 7.8.0 (via [Libbeat] Respect theCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.parameters
option defined in the ES output. #18326), which has not yet been released.Related issues