From ee43c336a7e78f33aaae8987e6e16a03f574ba0b Mon Sep 17 00:00:00 2001 From: Jakob Date: Thu, 7 Mar 2024 16:49:33 +0100 Subject: [PATCH] opensearchapi: Added new struct fields introduced by opensearch 2.12 (#482) * opensearchapi: Added new struct fields introduced by opensearch 2.12 Signed-off-by: Jakob Hahn * Changed field opensearch_version of type NodesInfoPlugin to json.RawMessage As opensearch 3.0.0 uses an array instead of string Signed-off-by: Jakob Hahn --------- Signed-off-by: Jakob Hahn --- CHANGELOG.md | 4 +- opensearchapi/api_cat-indices.go | 262 +++++++++++++++-------------- opensearchapi/api_cat-nodes.go | 4 + opensearchapi/api_cat-shards.go | 153 +++++++++-------- opensearchapi/api_cluster-stats.go | 3 + opensearchapi/api_indices-stats.go | 39 +++-- opensearchapi/api_nodes-info.go | 18 +- opensearchapi/api_nodes-stats.go | 214 +++++++++++------------ 8 files changed, 355 insertions(+), 342 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7fba5c988..7626324c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `github.com/aws/aws-sdk-go` from 1.48.13 to 1.50.21 - Bumps `github.com/aws/aws-sdk-go-v2/config` from 1.25.11 to 1.27.0 ### Added +- Added new struct fields introduced by opensearch 2.12 ([#482](https://github.com/opensearch-project/opensearch-go/pull/482)) ### Changed +- Changed field opensearch_version of type NodesInfoPlugin to json.RawMessage as opensearch 3.0.0 uses an array instead of string ([#482](https://github.com/opensearch-project/opensearch-go/pull/482)) ### Deprecated ### Removed ### Fixed @@ -142,4 +144,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [2.1.0]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.1...v2.1.0 [2.0.1]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.0...v2.0.1 [2.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.1.0...v2.0.0 -[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0 \ No newline at end of file +[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0 diff --git a/opensearchapi/api_cat-indices.go b/opensearchapi/api_cat-indices.go index b731395c9..b1b9152e8 100644 --- a/opensearchapi/api_cat-indices.go +++ b/opensearchapi/api_cat-indices.go @@ -58,133 +58,141 @@ type CatIndexResp struct { CreationDate int `json:"creation.date,string"` CreationDateString string `json:"creation.date.string"` // Pointer as newly created indices can return null - StoreSize *string `json:"store.size"` - PrimaryStoreSize *string `json:"pri.store.size"` - CompletionSize *string `json:"completion.size"` - PrimaryCompletionSize *string `json:"pri.completion.size"` - FieldDataMemorySize *string `json:"fielddata.memory_size"` - PrimaryFieldDataMemorySize *string `json:"pri.fielddata.memory_size"` - FieldDataEvictions *int `json:"fielddata.evictions,string"` - PrimaryFieldDataEvictions *int `json:"pri.fielddata.evictions,string"` - QueryCacheMemorySize *string `json:"query_cache.memory_size"` - PrimaryQueryCacheMemorySize *string `json:"pri.query_cache.memory_size"` - QueryCacheEvictions *int `json:"query_cache.evictions,string"` - PrimaryQueryCacheEvictions *int `json:"pri.query_cache.evictions,string"` - RequestCacheMemorySize *string `json:"request_cache.memory_size"` - PrimaryRequestCacheMemorySize *string `json:"pri.request_cache.memory_size"` - RequestCacheEvictions *int `json:"request_cache.evictions,string"` - PrimaryRequestCacheEvictions *int `json:"pri.request_cache.evictions,string"` - RequestCacheHitCount *int `json:"request_cache.hit_count,string"` - PrimaryRequestCacheHitCount *int `json:"pri.request_cache.hit_count,string"` - RequestCacheMissCount *int `json:"request_cache.miss_count,string"` - PrimaryRequestCacheMissCount *int `json:"pri.request_cache.miss_count,string"` - FlushTotal *int `json:"flush.total,string"` - PrimaryFlushTotal *int `json:"pri.flush.total,string"` - FlushTime *string `json:"flush.total_time"` - PrimaryFlushTime *string `json:"pri.flush.total_time"` - GetCurrent *int `json:"get.current,string"` - PrimaryGetCurrent *int `json:"pri.get.current,string"` - GetTime *string `json:"get.time"` - PrimaryGetTime *string `json:"pri.get.time"` - GetTotal *int `json:"get.total,string"` - PrimaryGetTotal *int `json:"pri.get.total,string"` - GetExistsTime *string `json:"get.exists_time"` - PrimaryGetExistsTime *string `json:"pri.get.exists_time"` - GetExistsTotal *int `json:"get.exists_total,string"` - PrimaryGetExistsTotal *int `json:"pri.get.exists_total,string"` - GetMissingTime *string `json:"get.missing_time"` - PrimaryGetMissingTime *string `json:"pri.get.missing_time"` - GetMissingTotal *int `json:"get.missing_total,string"` - PrimaryGetMissingTotal *int `json:"pri.get.missing_total,string"` - IndexingDeleteCurrent *int `json:"indexing.delete_current,string"` - PrimaryIndexingDeleteCurrent *int `json:"pri.indexing.delete_current,string"` - IndexingDeleteTime *string `json:"indexing.delete_time"` - PrimaryIndexingDeleteTime *string `json:"pri.indexing.delete_time"` - IndexingDeleteTotal *int `json:"indexing.delete_total,string"` - PrimaryIndexingDeleteTotal *int `json:"pri.indexing.delete_total,string"` - IndexingIndexCurrent *int `json:"indexing.index_current,string"` - PrimaryIndexingIndexCurrent *int `json:"pri.indexing.index_current,string"` - IndexingIndexTime *string `json:"indexing.index_time"` - PrimaryIndexingIndexTime *string `json:"pri.indexing.index_time"` - IndexingIndexTotal *int `json:"indexing.index_total,string"` - PrimaryIndexingIndexTotal *int `json:"pri.indexing.index_total,string"` - IndexingIndexFailed *int `json:"indexing.index_failed,string"` - PrimaryIndexingIndexFailed *int `json:"pri.indexing.index_failed,string"` - MergesCurrent *int `json:"merges.current,string"` - PrimaryMergesCurrent *int `json:"pri.merges.current,string"` - MergesCurrentDocs *int `json:"merges.current_docs,string"` - PrimaryMergesCurrentDocs *int `json:"pri.merges.current_docs,string"` - MergesCurrentSize *string `json:"merges.current_size"` - PrimaryMergesCurrentSize *string `json:"pri.merges.current_size"` - MergesTotal *int `json:"merges.total,string"` - PrimaryMergesTotal *int `json:"pri.merges.total,string"` - MergesTotalDocs *int `json:"merges.total_docs,string"` - PrimaryMergesTotalDocs *int `json:"pri.merges.total_docs,string"` - MergesTotalSize *string `json:"merges.total_size"` - PrimaryMergesTotalSize *string `json:"pri.merges.total_size"` - MergesTotalTime *string `json:"merges.total_time"` - PrimaryMergesTotalTime *string `json:"pri.merges.total_time"` - RefreshTotal *int `json:"refresh.total,string"` - PrimaryRefreshTotal *int `json:"pri.refresh.total,string"` - RefreshTime *string `json:"refresh.time"` - PrimaryRefreshTime *string `json:"pri.refresh.time"` - RefreshExternalTotal *int `json:"refresh.external_total,string"` - PrimaryRefreshExternalTotal *int `json:"pri.refresh.external_total,string"` - RefreshExternalTime *string `json:"refresh.external_time"` - PrimaryRefreshExternalTime *string `json:"pri.refresh.external_time"` - RefreshListeners *int `json:"refresh.listeners,string"` - PrimaryRefreshListeners *int `json:"pri.refresh.listeners,string"` - SearchFetchCurrent *int `json:"search.fetch_current,string"` - PrimarySearchFetchCurrent *int `json:"pri.search.fetch_current,string"` - SearchFetchTime *string `json:"search.fetch_time"` - PrimarySearchFetchTime *string `json:"pri.search.fetch_time"` - SearchFetchTotal *int `json:"search.fetch_total,string"` - PrimarySearchFetchTotal *int `json:"pri.search.fetch_total,string"` - SearchOpenContexts *int `json:"search.open_contexts,string"` - PrimarySearchOpenContexts *int `json:"pri.search.open_contexts,string"` - SearchQueryCurrent *int `json:"search.query_current,string"` - PrimarySearchQueryCurrent *int `json:"pri.search.query_current,string"` - SearchQueryTime *string `json:"search.query_time"` - PrimarySearchQueryTime *string `json:"pri.search.query_time"` - SearchQueryTotal *int `json:"search.query_total,string"` - PrimarySearchQueryTotal *int `json:"pri.search.query_total,string"` - SearchScrollCurrent *int `json:"search.scroll_current,string"` - PrimarySearchScrollCurrent *int `json:"pri.search.scroll_current,string"` - SearchScrollTime *string `json:"search.scroll_time"` - PrimarySearchScrollTime *string `json:"pri.search.scroll_time"` - SearchScrollTotal *int `json:"search.scroll_total,string"` - PrimarySearchScrollTotal *int `json:"pri.search.scroll_total,string"` - SearchPointInTimeCurrent *string `json:"search.point_in_time_current"` - PrimarySearchPointInTimeCurrent *string `json:"pri.search.point_in_time_current"` - SearchPointInTimeTime *string `json:"search.point_in_time_time"` - PrimarySearchPointInTimeTime *string `json:"pri.search.point_in_time_time"` - SearchPointInTimeTotal *int `json:"search.point_in_time_total,string"` - PrimarySearchPointInTimeTotal *int `json:"pri.search.point_in_time_total,string"` - SegmentsCount *int `json:"segments.count,string"` - PrimarySegmentsCount *int `json:"pri.segments.count,string"` - SegmentsMemory *string `json:"segments.memory"` - PrimarySegmentsMemory *string `json:"pri.segments.memory"` - SegmentsIndexWriteMemory *string `json:"segments.index_writer_memory"` - PrimarySegmentsIndexWriteMemory *string `json:"pri.segments.index_writer_memory"` - SegmentsVersionMapMemory *string `json:"segments.version_map_memory"` - PrimarySegmentsVersionMapMemory *string `json:"pri.segments.version_map_memory"` - SegmentsFixedBitsetMemory *string `json:"segments.fixed_bitset_memory"` - PrimarySegmentsFixedBitsetMemory *string `json:"pri.segments.fixed_bitset_memory"` - WarmerCurrent *int `json:"warmer.current,string"` - PrimaryWarmerCurrent *int `json:"pri.warmer.current,string"` - WarmerTotal *int `json:"warmer.total,string"` - PrimaryWarmerTotal *int `json:"pri.warmer.total,string"` - WarmerTotalTime *string `json:"warmer.total_time"` - PrimaryWarmerTotalTime *string `json:"pri.warmer.total_time"` - SuggestCurrent *int `json:"suggest.current,string"` - PrimarySuggestCurrent *int `json:"pri.suggest.current,string"` - SuggestTime *string `json:"suggest.time"` - PrimarySuggestTime *string `json:"pri.suggest.time"` - SuggestTotal *int `json:"suggest.total,string"` - PrimarySuggestTotal *int `json:"pri.suggest.total,string"` - MemoryTotal string `json:"memory.total"` - PrimaryMemoryTotal string `json:"pri.memory.total"` - SearchThrottled bool `json:"search.throttled,string"` + StoreSize *string `json:"store.size"` + PrimaryStoreSize *string `json:"pri.store.size"` + CompletionSize *string `json:"completion.size"` + PrimaryCompletionSize *string `json:"pri.completion.size"` + FieldDataMemorySize *string `json:"fielddata.memory_size"` + PrimaryFieldDataMemorySize *string `json:"pri.fielddata.memory_size"` + FieldDataEvictions *int `json:"fielddata.evictions,string"` + PrimaryFieldDataEvictions *int `json:"pri.fielddata.evictions,string"` + QueryCacheMemorySize *string `json:"query_cache.memory_size"` + PrimaryQueryCacheMemorySize *string `json:"pri.query_cache.memory_size"` + QueryCacheEvictions *int `json:"query_cache.evictions,string"` + PrimaryQueryCacheEvictions *int `json:"pri.query_cache.evictions,string"` + RequestCacheMemorySize *string `json:"request_cache.memory_size"` + PrimaryRequestCacheMemorySize *string `json:"pri.request_cache.memory_size"` + RequestCacheEvictions *int `json:"request_cache.evictions,string"` + PrimaryRequestCacheEvictions *int `json:"pri.request_cache.evictions,string"` + RequestCacheHitCount *int `json:"request_cache.hit_count,string"` + PrimaryRequestCacheHitCount *int `json:"pri.request_cache.hit_count,string"` + RequestCacheMissCount *int `json:"request_cache.miss_count,string"` + PrimaryRequestCacheMissCount *int `json:"pri.request_cache.miss_count,string"` + FlushTotal *int `json:"flush.total,string"` + PrimaryFlushTotal *int `json:"pri.flush.total,string"` + FlushTime *string `json:"flush.total_time"` + PrimaryFlushTime *string `json:"pri.flush.total_time"` + GetCurrent *int `json:"get.current,string"` + PrimaryGetCurrent *int `json:"pri.get.current,string"` + GetTime *string `json:"get.time"` + PrimaryGetTime *string `json:"pri.get.time"` + GetTotal *int `json:"get.total,string"` + PrimaryGetTotal *int `json:"pri.get.total,string"` + GetExistsTime *string `json:"get.exists_time"` + PrimaryGetExistsTime *string `json:"pri.get.exists_time"` + GetExistsTotal *int `json:"get.exists_total,string"` + PrimaryGetExistsTotal *int `json:"pri.get.exists_total,string"` + GetMissingTime *string `json:"get.missing_time"` + PrimaryGetMissingTime *string `json:"pri.get.missing_time"` + GetMissingTotal *int `json:"get.missing_total,string"` + PrimaryGetMissingTotal *int `json:"pri.get.missing_total,string"` + IndexingDeleteCurrent *int `json:"indexing.delete_current,string"` + PrimaryIndexingDeleteCurrent *int `json:"pri.indexing.delete_current,string"` + IndexingDeleteTime *string `json:"indexing.delete_time"` + PrimaryIndexingDeleteTime *string `json:"pri.indexing.delete_time"` + IndexingDeleteTotal *int `json:"indexing.delete_total,string"` + PrimaryIndexingDeleteTotal *int `json:"pri.indexing.delete_total,string"` + IndexingIndexCurrent *int `json:"indexing.index_current,string"` + PrimaryIndexingIndexCurrent *int `json:"pri.indexing.index_current,string"` + IndexingIndexTime *string `json:"indexing.index_time"` + PrimaryIndexingIndexTime *string `json:"pri.indexing.index_time"` + IndexingIndexTotal *int `json:"indexing.index_total,string"` + PrimaryIndexingIndexTotal *int `json:"pri.indexing.index_total,string"` + IndexingIndexFailed *int `json:"indexing.index_failed,string"` + PrimaryIndexingIndexFailed *int `json:"pri.indexing.index_failed,string"` + MergesCurrent *int `json:"merges.current,string"` + PrimaryMergesCurrent *int `json:"pri.merges.current,string"` + MergesCurrentDocs *int `json:"merges.current_docs,string"` + PrimaryMergesCurrentDocs *int `json:"pri.merges.current_docs,string"` + MergesCurrentSize *string `json:"merges.current_size"` + PrimaryMergesCurrentSize *string `json:"pri.merges.current_size"` + MergesTotal *int `json:"merges.total,string"` + PrimaryMergesTotal *int `json:"pri.merges.total,string"` + MergesTotalDocs *int `json:"merges.total_docs,string"` + PrimaryMergesTotalDocs *int `json:"pri.merges.total_docs,string"` + MergesTotalSize *string `json:"merges.total_size"` + PrimaryMergesTotalSize *string `json:"pri.merges.total_size"` + MergesTotalTime *string `json:"merges.total_time"` + PrimaryMergesTotalTime *string `json:"pri.merges.total_time"` + RefreshTotal *int `json:"refresh.total,string"` + PrimaryRefreshTotal *int `json:"pri.refresh.total,string"` + RefreshTime *string `json:"refresh.time"` + PrimaryRefreshTime *string `json:"pri.refresh.time"` + RefreshExternalTotal *int `json:"refresh.external_total,string"` + PrimaryRefreshExternalTotal *int `json:"pri.refresh.external_total,string"` + RefreshExternalTime *string `json:"refresh.external_time"` + PrimaryRefreshExternalTime *string `json:"pri.refresh.external_time"` + RefreshListeners *int `json:"refresh.listeners,string"` + PrimaryRefreshListeners *int `json:"pri.refresh.listeners,string"` + SearchFetchCurrent *int `json:"search.fetch_current,string"` + PrimarySearchFetchCurrent *int `json:"pri.search.fetch_current,string"` + SearchFetchTime *string `json:"search.fetch_time"` + PrimarySearchFetchTime *string `json:"pri.search.fetch_time"` + SearchFetchTotal *int `json:"search.fetch_total,string"` + PrimarySearchFetchTotal *int `json:"pri.search.fetch_total,string"` + SearchOpenContexts *int `json:"search.open_contexts,string"` + PrimarySearchOpenContexts *int `json:"pri.search.open_contexts,string"` + SearchQueryCurrent *int `json:"search.query_current,string"` + PrimarySearchQueryCurrent *int `json:"pri.search.query_current,string"` + SearchQueryTime *string `json:"search.query_time"` + PrimarySearchQueryTime *string `json:"pri.search.query_time"` + SearchQueryTotal *int `json:"search.query_total,string"` + PrimarySearchQueryTotal *int `json:"pri.search.query_total,string"` + SearchConcurrentQueryCurrent *int `json:"search.concurrent_query_current,string"` + PrimarySearchConcurrentQueryCurrent *int `json:"pri.search.concurrent_query_current,string"` + SearchConcurrentQueryTime *string `json:"search.concurrent_query_time"` + PrimarySearchConcurrentQueryTime *string `json:"pri.search.concurrent_query_time"` + SearchConcurrentQueryTotal *int `json:"search.concurrent_query_total,string"` + PrimarySearchConcurrentQueryTotal *int `json:"pri.search.concurrent_query_total,string"` + SearchConcurrentAvgSliceCount *string `json:"search.concurrent_avg_slice_count"` + PrimarySearchConcurrentAvgSliceCount *string `json:"pri.search.concurrent_avg_slice_count"` + SearchScrollCurrent *int `json:"search.scroll_current,string"` + PrimarySearchScrollCurrent *int `json:"pri.search.scroll_current,string"` + SearchScrollTime *string `json:"search.scroll_time"` + PrimarySearchScrollTime *string `json:"pri.search.scroll_time"` + SearchScrollTotal *int `json:"search.scroll_total,string"` + PrimarySearchScrollTotal *int `json:"pri.search.scroll_total,string"` + SearchPointInTimeCurrent *string `json:"search.point_in_time_current"` + PrimarySearchPointInTimeCurrent *string `json:"pri.search.point_in_time_current"` + SearchPointInTimeTime *string `json:"search.point_in_time_time"` + PrimarySearchPointInTimeTime *string `json:"pri.search.point_in_time_time"` + SearchPointInTimeTotal *int `json:"search.point_in_time_total,string"` + PrimarySearchPointInTimeTotal *int `json:"pri.search.point_in_time_total,string"` + SegmentsCount *int `json:"segments.count,string"` + PrimarySegmentsCount *int `json:"pri.segments.count,string"` + SegmentsMemory *string `json:"segments.memory"` + PrimarySegmentsMemory *string `json:"pri.segments.memory"` + SegmentsIndexWriteMemory *string `json:"segments.index_writer_memory"` + PrimarySegmentsIndexWriteMemory *string `json:"pri.segments.index_writer_memory"` + SegmentsVersionMapMemory *string `json:"segments.version_map_memory"` + PrimarySegmentsVersionMapMemory *string `json:"pri.segments.version_map_memory"` + SegmentsFixedBitsetMemory *string `json:"segments.fixed_bitset_memory"` + PrimarySegmentsFixedBitsetMemory *string `json:"pri.segments.fixed_bitset_memory"` + WarmerCurrent *int `json:"warmer.current,string"` + PrimaryWarmerCurrent *int `json:"pri.warmer.current,string"` + WarmerTotal *int `json:"warmer.total,string"` + PrimaryWarmerTotal *int `json:"pri.warmer.total,string"` + WarmerTotalTime *string `json:"warmer.total_time"` + PrimaryWarmerTotalTime *string `json:"pri.warmer.total_time"` + SuggestCurrent *int `json:"suggest.current,string"` + PrimarySuggestCurrent *int `json:"pri.suggest.current,string"` + SuggestTime *string `json:"suggest.time"` + PrimarySuggestTime *string `json:"pri.suggest.time"` + SuggestTotal *int `json:"suggest.total,string"` + PrimarySuggestTotal *int `json:"pri.suggest.total,string"` + MemoryTotal string `json:"memory.total"` + PrimaryMemoryTotal string `json:"pri.memory.total"` + SearchThrottled bool `json:"search.throttled,string"` } // Inspect returns the Inspect type containing the raw *opensearch.Reponse diff --git a/opensearchapi/api_cat-nodes.go b/opensearchapi/api_cat-nodes.go index 352af4936..f51da626d 100644 --- a/opensearchapi/api_cat-nodes.go +++ b/opensearchapi/api_cat-nodes.go @@ -118,6 +118,10 @@ type CatNodesItemResp struct { SearchQueryCurrent int `json:"search.query_current,string"` SearchQueryTime string `json:"search.query_time"` SearchQueryTotal int `json:"search.query_total,string"` + SearchConcurrentQueryCurrent int `json:"search.concurrent_query_current,string"` + SearchConcurrentQueryTime string `json:"search.concurrent_query_time"` + SearchConcurrentQueryTotal int `json:"search.concurrent_query_total,string"` + SearchConcurrentAvgSliceCount string `json:"search.concurrent_avg_slice_count"` SearchScrollCurrent int `json:"search.scroll_current,string"` SearchScrollTime string `json:"search.scroll_time"` SearchScrollTotal int `json:"search.scroll_total,string"` diff --git a/opensearchapi/api_cat-shards.go b/opensearchapi/api_cat-shards.go index 10f674826..a87d8d3ac 100644 --- a/opensearchapi/api_cat-shards.go +++ b/opensearchapi/api_cat-shards.go @@ -47,80 +47,85 @@ type CatShardsResp struct { // CatShardResp represents one index of the CatShardsResp type CatShardResp struct { - Index string `json:"index"` - Shard int `json:"shard,string"` - Prirep string `json:"prirep"` - State string `json:"state"` - Docs *string `json:"docs"` - Store *string `json:"store"` - IP *string `json:"ip"` - ID *string `json:"id"` - Node *string `json:"node"` - SyncID *string `json:"sync_id"` - UnassignedReason *string `json:"unassigned.reason"` - UnassignedAt *string `json:"unassigned.at"` - UnassignedFor *string `json:"unassigned.for"` - UnassignedDetails *string `json:"unassigned.details"` - RecoverysourceType *string `json:"recoverysource.type"` - CompletionSize *string `json:"completion.size"` - FielddataMemorySize *string `json:"fielddata.memory_size"` - FielddataEvictions *int `json:"fielddata.evictions,string"` - QueryCacheMemorySize *string `json:"query_cache.memory_size"` - QueryCacheEvictions *int `json:"query_cache.evictions,string"` - FlushTotal *int `json:"flush.total,string"` - FlushTotalTime *string `json:"flush.total_time"` - GetCurrent *int `json:"get.current,string"` - GetTime *string `json:"get.time"` - GetTotal *int `json:"get.total,string"` - GetExistsTime *string `json:"get.exists_time"` - GetExistsTotal *int `json:"get.exists_total,string"` - GetMissingTime *string `json:"get.missing_time"` - GetMissingTotal *int `json:"get.missing_total,string"` - IndexingDeleteCurrent *int `json:"indexing.delete_current,string"` - IndexingDeleteTime *string `json:"indexing.delete_time"` - IndexingDeleteTotal *string `json:"indexing.delete_total"` - IndexingIndexCurrent *int `json:"indexing.index_current,string"` - IndexingIndexTime *string `json:"indexing.index_time"` - IndexingIndexTotal *int `json:"indexing.index_total,string"` - IndexingIndexFailed *int `json:"indexing.index_failed,string"` - MergesCurrent *int `json:"merges.current,string"` - MergesCurrentDocs *int `json:"merges.current_docs,string"` - MergesCurrentSize *string `json:"merges.current_size"` - MergesTotal *int `json:"merges.total,string"` - MergesTotalDocs *int `json:"merges.total_docs,string"` - MergesTotalSize *string `json:"merges.total_size"` - MergesTotalTime *string `json:"merges.total_time"` - RefreshTotal *int `json:"refresh.total,string"` - RefreshTime *string `json:"refresh.time"` - RefreshExternalTotal *int `json:"refresh.external_total,string"` - RefreshExternalTime *string `json:"refresh.external_time"` - RefreshListeners *int `json:"refresh.listeners,string"` - SearchFetchCurrent *int `json:"search.fetch_current,string"` - SearchFetchTime *string `json:"search.fetch_time"` - SearchFetchTotal *int `json:"search.fetch_total,string"` - SearchOpenContexts *int `json:"search.open_contexts,string"` - SearchQueryCurrent *int `json:"search.query_current,string"` - SearchQueryTime *string `json:"search.query_time"` - SearchQueryTotal *int `json:"search.query_total,string"` - SearchScrollCurrent *int `json:"search.scroll_current,string"` - SearchScrollTime *string `json:"search.scroll_time"` - SearchScrollTotal *int `json:"search.scroll_total,string"` - SearchPointInTimeCurrent *int `json:"search.point_in_time_current,string"` - SearchPointInTimeTime *string `json:"search.point_in_time_time"` - SearchPointInTimeTotal *int `json:"search.point_in_time_total,string"` - SegmentsCount *int `json:"segments.count,string"` - SegmentsMemory *string `json:"segments.memory"` - SegmentsIndexWriterMemory *string `json:"segments.index_writer_memory"` - SegmentsVersionMapMemory *string `json:"segments.version_map_memory"` - SegmentsFixedBitsetMemory *string `json:"segments.fixed_bitset_memory"` - SeqNoMax *int `json:"seq_no.max,string"` - SeqNoLocalCheckpoint *int `json:"seq_no.local_checkpoint,string"` - SeqNoGlobalCheckpoint *int `json:"seq_no.global_checkpoint,string"` - WarmerCurrent *int `json:"warmer.current,string"` - WarmerTotal *int `json:"warmer.total,string"` - WarmerTotalTime *string `json:"warmer.total_time"` - PathData *string `json:"path.data"` - PathState *string `json:"path.state"` + Index string `json:"index"` + Shard int `json:"shard,string"` + Prirep string `json:"prirep"` + State string `json:"state"` + Docs *string `json:"docs"` + Store *string `json:"store"` + IP *string `json:"ip"` + ID *string `json:"id"` + Node *string `json:"node"` + SyncID *string `json:"sync_id"` + UnassignedReason *string `json:"unassigned.reason"` + UnassignedAt *string `json:"unassigned.at"` + UnassignedFor *string `json:"unassigned.for"` + UnassignedDetails *string `json:"unassigned.details"` + RecoverysourceType *string `json:"recoverysource.type"` + CompletionSize *string `json:"completion.size"` + FielddataMemorySize *string `json:"fielddata.memory_size"` + FielddataEvictions *int `json:"fielddata.evictions,string"` + QueryCacheMemorySize *string `json:"query_cache.memory_size"` + QueryCacheEvictions *int `json:"query_cache.evictions,string"` + FlushTotal *int `json:"flush.total,string"` + FlushTotalTime *string `json:"flush.total_time"` + GetCurrent *int `json:"get.current,string"` + GetTime *string `json:"get.time"` + GetTotal *int `json:"get.total,string"` + GetExistsTime *string `json:"get.exists_time"` + GetExistsTotal *int `json:"get.exists_total,string"` + GetMissingTime *string `json:"get.missing_time"` + GetMissingTotal *int `json:"get.missing_total,string"` + IndexingDeleteCurrent *int `json:"indexing.delete_current,string"` + IndexingDeleteTime *string `json:"indexing.delete_time"` + IndexingDeleteTotal *string `json:"indexing.delete_total"` + IndexingIndexCurrent *int `json:"indexing.index_current,string"` + IndexingIndexTime *string `json:"indexing.index_time"` + IndexingIndexTotal *int `json:"indexing.index_total,string"` + IndexingIndexFailed *int `json:"indexing.index_failed,string"` + MergesCurrent *int `json:"merges.current,string"` + MergesCurrentDocs *int `json:"merges.current_docs,string"` + MergesCurrentSize *string `json:"merges.current_size"` + MergesTotal *int `json:"merges.total,string"` + MergesTotalDocs *int `json:"merges.total_docs,string"` + MergesTotalSize *string `json:"merges.total_size"` + MergesTotalTime *string `json:"merges.total_time"` + RefreshTotal *int `json:"refresh.total,string"` + RefreshTime *string `json:"refresh.time"` + RefreshExternalTotal *int `json:"refresh.external_total,string"` + RefreshExternalTime *string `json:"refresh.external_time"` + RefreshListeners *int `json:"refresh.listeners,string"` + SearchFetchCurrent *int `json:"search.fetch_current,string"` + SearchFetchTime *string `json:"search.fetch_time"` + SearchFetchTotal *int `json:"search.fetch_total,string"` + SearchOpenContexts *int `json:"search.open_contexts,string"` + SearchQueryCurrent *int `json:"search.query_current,string"` + SearchQueryTime *string `json:"search.query_time"` + SearchQueryTotal *int `json:"search.query_total,string"` + SearchConcurrentQueryCurrent *int `json:"search.concurrent_query_current,string"` + SearchConcurrentQueryTime *string `json:"search.concurrent_query_time"` + SearchConcurrentQueryTotal *int `json:"search.concurrent_query_total,string"` + SearchConcurrentAvgSliceCount *string `json:"search.concurrent_avg_slice_count"` + SearchScrollCurrent *int `json:"search.scroll_current,string"` + SearchScrollTime *string `json:"search.scroll_time"` + SearchScrollTotal *int `json:"search.scroll_total,string"` + SearchPointInTimeCurrent *int `json:"search.point_in_time_current,string"` + SearchPointInTimeTime *string `json:"search.point_in_time_time"` + SearchPointInTimeTotal *int `json:"search.point_in_time_total,string"` + SegmentsCount *int `json:"segments.count,string"` + SegmentsMemory *string `json:"segments.memory"` + SegmentsIndexWriterMemory *string `json:"segments.index_writer_memory"` + SegmentsVersionMapMemory *string `json:"segments.version_map_memory"` + SegmentsFixedBitsetMemory *string `json:"segments.fixed_bitset_memory"` + SeqNoMax *int `json:"seq_no.max,string"` + SeqNoLocalCheckpoint *int `json:"seq_no.local_checkpoint,string"` + SeqNoGlobalCheckpoint *int `json:"seq_no.global_checkpoint,string"` + WarmerCurrent *int `json:"warmer.current,string"` + WarmerTotal *int `json:"warmer.total,string"` + WarmerTotalTime *string `json:"warmer.total_time"` + PathData *string `json:"path.data"` + PathState *string `json:"path.state"` + DocsDeleted *int `json:"docs.deleted,string"` } // Inspect returns the Inspect type containing the raw *opensearch.Reponse diff --git a/opensearchapi/api_cluster-stats.go b/opensearchapi/api_cluster-stats.go index 714954bcb..40764c6d2 100644 --- a/opensearchapi/api_cluster-stats.go +++ b/opensearchapi/api_cluster-stats.go @@ -139,6 +139,9 @@ type ClusterStatsIndices struct { } `json:"refresh_size_lag"` MaxRefreshTimeLagInMillis int `json:"max_refresh_time_lag_in_millis"` TotalTimeSpentInMillis int `json:"total_time_spent_in_millis"` + Pressure struct { + TotalRejections int `json:"total_rejections"` + } `json:"pressure"` } `json:"upload"` Download struct { TotalDownloadSize struct { diff --git a/opensearchapi/api_indices-stats.go b/opensearchapi/api_indices-stats.go index d5bdccc1d..80e08772c 100644 --- a/opensearchapi/api_indices-stats.go +++ b/opensearchapi/api_indices-stats.go @@ -108,22 +108,26 @@ type IndicesStatsGet struct { // IndicesStatsSearch is a sub type of IndicesStatsInfo containing stats about index search type IndicesStatsSearch struct { - OpenContexts int `json:"open_contexts"` - QueryTotal int `json:"query_total"` - QueryTimeInMillis int `json:"query_time_in_millis"` - QueryCurrent int `json:"query_current"` - FetchTotal int `json:"fetch_total"` - FetchTimeInMillis int `json:"fetch_time_in_millis"` - FetchCurrent int `json:"fetch_current"` - ScrollTotal int `json:"scroll_total"` - ScrollTimeInMillis int `json:"scroll_time_in_millis"` - ScrollCurrent int `json:"scroll_current"` - PointInTimeTotal int `json:"point_in_time_total"` - PointInTimeTimeInMillis int `json:"point_in_time_time_in_millis"` - PointInTimeCurrent int `json:"point_in_time_current"` - SuggestTotal int `json:"suggest_total"` - SuggestTimeInMillis int `json:"suggest_time_in_millis"` - SuggestCurrent int `json:"suggest_current"` + OpenContexts int `json:"open_contexts"` + QueryTotal int `json:"query_total"` + QueryTimeInMillis int `json:"query_time_in_millis"` + QueryCurrent int `json:"query_current"` + ConcurrentQueryTotal int `json:"concurrent_query_total"` + ConcurrentQueryTimeInMillis int `json:"concurrent_query_time_in_millis"` + ConcurrentQueryCurrent int `json:"concurrent_query_current"` + ConcurrentAVGSliceCount float32 `json:"concurrent_avg_slice_count"` + FetchTotal int `json:"fetch_total"` + FetchTimeInMillis int `json:"fetch_time_in_millis"` + FetchCurrent int `json:"fetch_current"` + ScrollTotal int `json:"scroll_total"` + ScrollTimeInMillis int `json:"scroll_time_in_millis"` + ScrollCurrent int `json:"scroll_current"` + PointInTimeTotal int `json:"point_in_time_total"` + PointInTimeTimeInMillis int `json:"point_in_time_time_in_millis"` + PointInTimeCurrent int `json:"point_in_time_current"` + SuggestTotal int `json:"suggest_total"` + SuggestTimeInMillis int `json:"suggest_time_in_millis"` + SuggestCurrent int `json:"suggest_current"` } // IndicesStatsMerges is a sub type of IndicesStatsInfo containing stats about index merges @@ -213,6 +217,9 @@ type IndicesStatsSegments struct { } `json:"refresh_size_lag"` MaxRefreshTimeLagInMillis int `json:"max_refresh_time_lag_in_millis"` TotalTimeSpentInMillis int `json:"total_time_spent_in_millis"` + Pressure struct { + TotalRejections int `json:"total_rejections"` + } `json:"pressure"` } `json:"upload"` Download struct { TotalDownloadSize struct { diff --git a/opensearchapi/api_nodes-info.go b/opensearchapi/api_nodes-info.go index cfd3e68a6..ec99cfc03 100644 --- a/opensearchapi/api_nodes-info.go +++ b/opensearchapi/api_nodes-info.go @@ -161,15 +161,15 @@ type NodesInfoHTTP struct { // NodesInfoPlugin is a sub type of NodesInfo containing information about a plugin type NodesInfoPlugin struct { - Name string `json:"name"` - Version string `json:"version"` - OpensearchVersion string `json:"opensearch_version"` - JavaVersion string `json:"java_version"` - Description string `json:"description"` - Classname string `json:"classname"` - CustomFoldername string `json:"custom_foldername"` - ExtendedPlugins []string `json:"extended_plugins"` - HasNativeController bool `json:"has_native_controller"` + Name string `json:"name"` + Version string `json:"version"` + OpensearchVersion json.RawMessage `json:"opensearch_version"` + JavaVersion string `json:"java_version"` + Description string `json:"description"` + Classname string `json:"classname"` + CustomFoldername string `json:"custom_foldername"` + ExtendedPlugins []string `json:"extended_plugins"` + HasNativeController bool `json:"has_native_controller"` } // NodesInfoIngest is a sub type of NodesInfo containing information about ingest processors diff --git a/opensearchapi/api_nodes-stats.go b/opensearchapi/api_nodes-stats.go index b535b176c..7b18c968c 100644 --- a/opensearchapi/api_nodes-stats.go +++ b/opensearchapi/api_nodes-stats.go @@ -78,34 +78,38 @@ func (r NodesStatsResp) Inspect() Inspect { // NodesStats is a map item of NodesStatsResp representing all values of a node type NodesStats struct { - Timestamp int `json:"timestamp"` - Name string `json:"name"` - TransportAddress string `json:"transport_address"` - Host string `json:"host"` - IP string `json:"ip"` - Roles []string `json:"roles"` - Attributes map[string]string `json:"attributes"` - Indices NodesStatsIndices `json:"indices"` - OS NodesStatsOS `json:"os"` - Process NodesStatsProcess `json:"process"` - JVM NodesStatsJVM `json:"jvm"` - ThreadPool NodesStatsThreadPool `json:"thread_pool"` - FS NodesStatsFS `json:"fs"` - Transport NodesStatsTransport `json:"transport"` - HTTP NodesStatsHTTP `json:"http"` - Breakers NodesStatsBreakers `json:"breakers"` - Scripts NodesStatsScript `json:"script"` - Discovery NodesStatsDiscovery `json:"discovery"` - Ingest NodesStatsIngest `json:"ingest"` - AdaptiveSelection NodesStatsAdaptiveSelection `json:"adaptive_selection"` - ScriptCache NodesStatsScriptCache `json:"script_cache"` - IndexingPressure NodesStatsIndexingPressure `json:"indexing_pressure"` - ShardIndexingPressure NodesStatsShardIndexingPressure `json:"shard_indexing_pressure"` - SearchBackpressure NodesStatsSearchBackpressure `json:"search_backpressure"` - ClusterManagerThrottling NodesStatsClusterManagerThrottling `json:"cluster_manager_throttling"` - WeightedRouting NodesStatsWeightedRouting `json:"weighted_routing"` - SearchPipeline NodesStatsSearchPipeline `json:"search_pipeline"` - TaskCancellation NodesStatsTaskCancellation `json:"task_cancellation"` + Timestamp int `json:"timestamp"` + Name string `json:"name"` + TransportAddress string `json:"transport_address"` + Host string `json:"host"` + IP string `json:"ip"` + Roles []string `json:"roles"` + Attributes map[string]string `json:"attributes"` + Indices NodesStatsIndices `json:"indices"` + OS NodesStatsOS `json:"os"` + Process NodesStatsProcess `json:"process"` + JVM NodesStatsJVM `json:"jvm"` + ThreadPool NodesStatsThreadPool `json:"thread_pool"` + FS NodesStatsFS `json:"fs"` + Transport NodesStatsTransport `json:"transport"` + HTTP NodesStatsHTTP `json:"http"` + Breakers NodesStatsBreakers `json:"breakers"` + Scripts NodesStatsScript `json:"script"` + Discovery NodesStatsDiscovery `json:"discovery"` + Ingest NodesStatsIngest `json:"ingest"` + AdaptiveSelection NodesStatsAdaptiveSelection `json:"adaptive_selection"` + ScriptCache NodesStatsScriptCache `json:"script_cache"` + IndexingPressure NodesStatsIndexingPressure `json:"indexing_pressure"` + ShardIndexingPressure NodesStatsShardIndexingPressure `json:"shard_indexing_pressure"` + SearchBackpressure NodesStatsSearchBackpressure `json:"search_backpressure"` + ClusterManagerThrottling NodesStatsClusterManagerThrottling `json:"cluster_manager_throttling"` + WeightedRouting NodesStatsWeightedRouting `json:"weighted_routing"` + SearchPipeline NodesStatsSearchPipeline `json:"search_pipeline"` + TaskCancellation NodesStatsTaskCancellation `json:"task_cancellation"` + ResourceUsageStats map[string]NodesStatsResourceUsageStats `json:"resource_usage_stats"` + SegmentReplicationBackpressure NodesStatsSegmentReplicationBackpressure `json:"segment_replication_backpressure"` + Repositories []json.RawMessage `json:"repositories"` + AdmissionControl NodesStatsAdmissionControl `json:"admission_control"` } // NodesStatsIndices is a sub type of NodesStats representing Indices information of the node @@ -141,23 +145,27 @@ type NodesStatsIndices struct { Current int `json:"current"` } `json:"get"` Search struct { - OpenContexts int `json:"open_contexts"` - QueryTotal int `json:"query_total"` - QueryTimeInMillis int `json:"query_time_in_millis"` - QueryCurrent int `json:"query_current"` - FetchTotal int `json:"fetch_total"` - FetchTimeInMillis int `json:"fetch_time_in_millis"` - FetchCurrent int `json:"fetch_current"` - ScrollTotal int `json:"scroll_total"` - ScrollTimeInMillis int `json:"scroll_time_in_millis"` - ScrollCurrent int `json:"scroll_current"` - PointInTimeTotal int `json:"point_in_time_total"` - PointInTimeTimeInMillis int `json:"point_in_time_time_in_millis"` - PointInTimeCurrent int `json:"point_in_time_current"` - SuggestTotal int `json:"suggest_total"` - SuggestTimeInMillis int `json:"suggest_time_in_millis"` - SuggestCurrent int `json:"suggest_current"` - Request struct { + OpenContexts int `json:"open_contexts"` + QueryTotal int `json:"query_total"` + QueryTimeInMillis int `json:"query_time_in_millis"` + QueryCurrent int `json:"query_current"` + ConcurrentQueryTotal int `json:"concurrent_query_total"` + ConcurrentQueryTimeInMillis int `json:"concurrent_query_time_in_millis"` + ConcurrentQueryCurrent int `json:"concurrent_query_current"` + ConcurrentAVGSliceCount float32 `json:"concurrent_avg_slice_count"` + FetchTotal int `json:"fetch_total"` + FetchTimeInMillis int `json:"fetch_time_in_millis"` + FetchCurrent int `json:"fetch_current"` + ScrollTotal int `json:"scroll_total"` + ScrollTimeInMillis int `json:"scroll_time_in_millis"` + ScrollCurrent int `json:"scroll_current"` + PointInTimeTotal int `json:"point_in_time_total"` + PointInTimeTimeInMillis int `json:"point_in_time_time_in_millis"` + PointInTimeCurrent int `json:"point_in_time_current"` + SuggestTotal int `json:"suggest_total"` + SuggestTimeInMillis int `json:"suggest_time_in_millis"` + SuggestCurrent int `json:"suggest_current"` + Request struct { DfsPreQuery NodesStatsIndicesSearchRequest `json:"dfs_pre_query"` Query NodesStatsIndicesSearchRequest `json:"query"` Fetch NodesStatsIndicesSearchRequest `json:"fetch"` @@ -238,6 +246,9 @@ type NodesStatsIndices struct { } `json:"refresh_size_lag"` MaxRefreshTimeLagInMillis int `json:"max_refresh_time_lag_in_millis"` TotalTimeSpentInMillis int `json:"total_time_spent_in_millis"` + Pressure struct { + TotalRejections int `json:"total_rejections"` + } `json:"pressure"` } `json:"upload"` Download struct { TotalDownloadSize struct { @@ -371,16 +382,7 @@ type NodesStatsJVM struct { PeakCount int `json:"peak_count"` } `json:"threads"` Gc struct { - Collectors struct { - Young struct { - CollectionCount int `json:"collection_count"` - CollectionTimeInMillis int `json:"collection_time_in_millis"` - } `json:"young"` - Old struct { - CollectionCount int `json:"collection_count"` - CollectionTimeInMillis int `json:"collection_time_in_millis"` - } `json:"old"` - } `json:"collectors"` + Collectors map[string]NodesStatsJVMGCCollectors `json:"collectors"` } `json:"gc"` // Not parsing each field directly as one of them contains singe quotes which are not allowed as tag in golang json // https://github.com/golang/go/issues/22518 @@ -392,71 +394,25 @@ type NodesStatsJVM struct { } `json:"classes"` } -// NodesStatsThreadPoolValues is a sub type of NodesStatsThreadPool representing all information a thread pool can have -type NodesStatsThreadPoolValues struct { - Threads int `json:"threads"` - Queue int `json:"queue"` - Active int `json:"active"` - Rejected int `json:"rejected"` - Largest int `json:"largest"` - Completed int `json:"completed"` +// NodesStatsJVMGCCollectors is a sub type of NodesStatsJVM containing collector information +type NodesStatsJVMGCCollectors struct { + CollectionCount int `json:"collection_count"` + CollectionTimeInMillis int `json:"collection_time_in_millis"` } -// NodesStatsThreadPoolValuesSearch is a sub type of NodesStatsThreadPool representing all information a search thread pool can have -type NodesStatsThreadPoolValuesSearch struct { - Threads int `json:"threads"` - Queue int `json:"queue"` - Active int `json:"active"` - Rejected int `json:"rejected"` - Largest int `json:"largest"` - Completed int `json:"completed"` - TotalWaitTimeInNanos int64 `json:"total_wait_time_in_nanos"` +// NodesStatsThreadPoolValues is a sub type of NodesStatsThreadPool representing all information a thread pool can have +type NodesStatsThreadPoolValues struct { + Threads int `json:"threads"` + Queue int `json:"queue"` + Active int `json:"active"` + Rejected int `json:"rejected"` + Largest int `json:"largest"` + Completed int `json:"completed"` + TotalWaitTimeInNanos *int64 `json:"total_wait_time_in_nanos,omitempty"` } // NodesStatsThreadPool is a sub type of NodesStats representing thread pool information of the node -type NodesStatsThreadPool struct { - AdBatchTaskThreadpool NodesStatsThreadPoolValues `json:"ad-batch-task-threadpool"` - AdThreadpool NodesStatsThreadPoolValues `json:"ad-threadpool"` - Analyze NodesStatsThreadPoolValues `json:"analyze"` - FetchShardStarted NodesStatsThreadPoolValues `json:"fetch_shard_started"` - FetchShardStore NodesStatsThreadPoolValues `json:"fetch_shard_store"` - Flush NodesStatsThreadPoolValues `json:"flush"` - ForceMerge NodesStatsThreadPoolValues `json:"force_merge"` - Generic NodesStatsThreadPoolValues `json:"generic"` - Get NodesStatsThreadPoolValues `json:"get"` - Listener NodesStatsThreadPoolValues `json:"listener"` - Management NodesStatsThreadPoolValues `json:"management"` - OpenDistroJobScheduler NodesStatsThreadPoolValues `json:"open_distro_job_scheduler"` - OpensearchAsynchronousSearchGeneric NodesStatsThreadPoolValues `json:"opensearch_asynchronous_search_generic"` - OpensearchMLTask NodesStatsThreadPoolValues `json:"OPENSEARCH_ML_TASK_THREAD_POOL"` - OpensearchMlDeploy NodesStatsThreadPoolValues `json:"opensearch_ml_deploy"` - OpensearchMlExecute NodesStatsThreadPoolValues `json:"opensearch_ml_execute"` - OpensearchMlGeneral NodesStatsThreadPoolValues `json:"opensearch_ml_general"` - OpensearchMlLoad NodesStatsThreadPoolValues `json:"opensearch_ml_load"` - OpensearchMlPredict NodesStatsThreadPoolValues `json:"opensearch_ml_predict"` - OpensearchMlRegister NodesStatsThreadPoolValues `json:"opensearch_ml_register"` - OpensearchMlTrain NodesStatsThreadPoolValues `json:"opensearch_ml_train"` - OpensearchMlUpload NodesStatsThreadPoolValues `json:"opensearch_ml_upload"` - Refresh NodesStatsThreadPoolValues `json:"refresh"` - RemotePurge NodesStatsThreadPoolValues `json:"remote_purge"` - RemoteRefresh NodesStatsThreadPoolValues `json:"remote_refresh"` - ReplicationFollower NodesStatsThreadPoolValues `json:"replication_follower"` - ReplicationLeader NodesStatsThreadPoolValues `json:"replication_leader"` - Search NodesStatsThreadPoolValuesSearch `json:"search"` - SearchThrottled NodesStatsThreadPoolValuesSearch `json:"search_throttled"` - Snapshot NodesStatsThreadPoolValues `json:"snapshot"` - SQLWorker NodesStatsThreadPoolValues `json:"sql-worker"` - SystemRead NodesStatsThreadPoolValues `json:"system_read"` - SystemWrite NodesStatsThreadPoolValues `json:"system_write"` - Training NodesStatsThreadPoolValues `json:"training"` - TranslogSync NodesStatsThreadPoolValues `json:"translog_sync"` - TranslogTransfer NodesStatsThreadPoolValues `json:"translog_transfer"` - Warmer NodesStatsThreadPoolValues `json:"warmer"` - Write NodesStatsThreadPoolValues `json:"write"` - PluginGeospatialIP2GeoDatasourceUpdate NodesStatsThreadPoolValues `json:"_plugin_geospatial_ip2geo_datasource_update"` - RemoteRefreshRetry NodesStatsThreadPoolValues `json:"remote_refresh_retry"` - RemoteRecovery NodesStatsThreadPoolValues `json:"remote_recovery"` -} +type NodesStatsThreadPool map[string]NodesStatsThreadPoolValues // NodesStatsFS is a sub type of NodesStats representing filesystem information of the node type NodesStatsFS struct { @@ -549,6 +505,13 @@ type NodesStatsDiscovery struct { IncompatibleDiffs int `json:"incompatible_diffs"` CompatibleDiffs int `json:"compatible_diffs"` } `json:"published_cluster_states"` + ClusterStateStats struct { + Overall struct { + UpdateCount int `json:"update_count"` + TotalTimeInMillis int `json:"total_time_in_millis"` + FailedCount int `json:"failed_count"` + } `json:"overall"` + } `json:"cluster_state_stats"` } // NodesStatsIngestDetails is a sub map type of NodsStatsIngest containing all information of ingest pipelines @@ -721,3 +684,24 @@ type NodesStatsIndicesSearchRequest struct { Current int `json:"current"` Total int `json:"total"` } + +// NodesStatsResourceUsageStats is a sub type of NodesStats containing nodes resource information +type NodesStatsResourceUsageStats struct { + Timestamp int64 `json:"timestamp"` + CPUUtilizationPercent string `json:"cpu_utilization_percent"` + MemoryUtilizationPercent string `json:"memory_utilization_percent"` +} + +// NodesStatsSegmentReplicationBackpressure is a sub type of NodesStats containing information about segment replication backpressure +type NodesStatsSegmentReplicationBackpressure struct { + TotalRejectedRequests int `json:"total_rejected_requests"` +} + +// NodesStatsAdmissionControl is a sub of NodesStats +type NodesStatsAdmissionControl struct { + GlobalCPUUsage struct { + Transport struct { + RejectionCount json.RawMessage `json:"rejection_count"` + } `json:"transport"` + } `json:"global_cpu_usage"` +}