[Stack Monitoring] remove cluster_stats dependency #147183
Draft
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.
Summary
Related #125401
Dirty implementation of a Stack Monitoring app that doesn't rely on
elasticsearch.cluster_stats
to display other monitored stack products./clusters
API call is now executing a single query that returns information of each monitored products, grouped by cluster_uuid. This data is shown is the Cluster listing view. I've removed the Indices count and Data size from the results since I don't see this data as valuable at this stage of the journey, and I'd rather have an overview of which products are actually tied to this cluster.The query relies on a single metricset (per product) being ingested to flag a product as monitored. This may sound fragile because the elasticsearch module collects 9 metricsets to power Stack Monitoring but this is reasonable because the metricsets are hardcoded when
xpack.enabled: true
, and the absence of the other metricsets would be an operational issue. We can implement these improvements [Stack Monitoring] Tolerate lack of elasticsearch metricset #130577 to cover this scenario gracefully.cluster_stats
documents in the/clusters/<uuid>
API. Note that this endpoint can be refactored more deeply and doesn't need to handle multiple clusters anymore since it is handled by the previous point.isSupported
checks orlicense
verification will be obsolete and can be safely removed.Testing
[1] standalone metricbeat
[2] monitoring metricbeat