-
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
Expose monitoring.cluster_uuid
in State API
#13254
Expose monitoring.cluster_uuid
in State API
#13254
Conversation
dcbf9e6
to
02e5203
Compare
monitoring.cluster_uuid
in State APImonitoring.cluster_uuid
in State API
monitoring.cluster_uuid
in State APImonitoring.cluster_uuid
in State API
Pinging @elastic/stack-monitoring |
jenkins, test this |
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.
This looks good, though I am wondering if this would be a candidate for some tests just to ensure this behavior doesn't regress in the future?
@cachedout I agree that we need tests around this change. So I started looking into writing tests for the libbeat API server and am planning to put up a separate PR for it. We currently have no tests for libbeat APIs. Looking at the API server code, it may require some refactoring to make it more testable. Specifically, it's easy to spin up the API server but most APIs return data from registries, and these don't get populated in a test context, so all API responses are returned as I expect this separate PR to take a bit of time (given what I noted above) and also potentially be comparatively larger than this one here. Are you okay with merging this PR here as-is and tracking tests in a separate issue (and PR)? |
Hi @ycombinator Regarding the testing-specific questions, I think it would be good to bring @ph and @urso into the conversation. I am fine with merging this as-is and tracking the testing concerns in another issue. I will mark this as approved so we can move forward with getting this in. |
Issue to track tests: #13578. |
Related: #13182.
This PR makes two (related) changes:
monitoring.cluster_uuid
setting value (if set) in the Beats State HTTP API (GET /state
).beat
Metricbeat module'sstate
andstats
metricsets.Testing this PR
.monitoring-*
indices.monitoring.cluster_uuid
infilebeat.yml
tofoobar
. Also sethttp.enabled
totrue
. Run Filebeat.monitoring.cluster_uuid
is set tofoobar
in the response.beat-xpack
module. Run Metricbeat..monitoring-beats-*
indices are created in Elasticsearch..monitoring-beats-*
indices contain thecluster_uuid
field with value asfoobar
.