Conversation
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.
/nocl This is part of an upcoming feature where a changelog will be introduced.
Closes https://github.com/Graylog2/graylog-plugin-enterprise/issues/15843
Description
Adds a cached metrics endpoint for index sets,
GET /system/indices/index_sets/metrics, which returnsindex_count,document_count,size_bytes,field_countanddeflector_healthfor a list of index set IDs.The endpoint reuses the entity metrics cache that serves the inputs and streams tables. It batches cluster calls across the requested index sets, caches values in MongoDB with per-field TTLs, and checks
indexsets:readfor each ID. The upcoming index sets table will fetch metrics once per page for the visible columns.Deflector health currently uses an aggregate result. Per-index-set health will follow separately.
How Has This Been Tested?
Manual testing instructions
GET /api/system/indices/index_sets.GET /api/system/indices/index_sets/metrics?index_set_ids=<id1>&index_set_ids=<id2>&fields=index_count&fields=document_count&fields=size_bytes&fields=field_count&fields=deflector_health. The response has one entry per ID with the requested fields.GET /api/system/indices/index_sets/<id>/statsand with the field count shown on the index set's field types page. They should match.entity_type: "index_sets"in themetrics_cachecollection, each field with its owncomputed_at. Stats and field counts refresh after 5 minutes, health after 1 minute.Types of changes
Checklist: