diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index f9a5afd374..62cc7cd375 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -70235,6 +70235,9 @@ "timestamp": { "description": "Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed.", "type": "number" + }, + "ccs": { + "$ref": "#/components/schemas/cluster.stats.CCSStats" } }, "required": [ @@ -70243,7 +70246,8 @@ "indices", "nodes", "status", - "timestamp" + "timestamp", + "ccs" ] } ] @@ -71528,6 +71532,222 @@ "min" ] }, + "cluster.stats.CCSStats": { + "type": "object", + "properties": { + "clusters": { + "description": "Contains remote cluster settings and metrics collected from them.\nThe keys are cluster names, and the values are per-cluster data.\nOnly present if `include_remotes` option is set to true.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.RemoteClusterInfo" + } + }, + "_search": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageStats" + }, + "_esql": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageStats" + } + }, + "required": [ + "_search" + ] + }, + "cluster.stats.RemoteClusterInfo": { + "type": "object", + "properties": { + "cluster_uuid": { + "description": "The UUID of the remote cluster.", + "type": "string" + }, + "mode": { + "description": "The connection mode used to communicate with the remote cluster.", + "type": "string" + }, + "skip_unavailable": { + "description": "The `skip_unavailable` setting used for this remote cluster.", + "type": "boolean" + }, + "transport_compress": { + "description": "Transport compression setting used for this remote cluster.", + "type": "string" + }, + "status": { + "$ref": "#/components/schemas/_types.HealthStatus" + }, + "version": { + "description": "The list of Elasticsearch versions used by the nodes on the remote cluster.", + "type": "array", + "items": { + "$ref": "#/components/schemas/_types.VersionString" + } + }, + "nodes_count": { + "description": "The total count of nodes in the remote cluster.", + "type": "number" + }, + "shards_count": { + "description": "The total number of shards in the remote cluster.", + "type": "number" + }, + "indices_count": { + "description": "The total number of indices in the remote cluster.", + "type": "number" + }, + "indices_total_size_in_bytes": { + "description": "Total data set size, in bytes, of all shards assigned to selected nodes.", + "type": "number" + }, + "indices_total_size": { + "description": "Total data set size of all shards assigned to selected nodes, as a human-readable string.", + "type": "string" + }, + "max_heap_in_bytes": { + "description": "Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster.", + "type": "number" + }, + "max_heap": { + "description": "Maximum amount of memory available for use by the heap across the nodes of the remote cluster, as a human-readable string.", + "type": "string" + }, + "mem_total_in_bytes": { + "description": "Total amount, in bytes, of physical memory across the nodes of the remote cluster.", + "type": "number" + }, + "mem_total": { + "description": "Total amount of physical memory across the nodes of the remote cluster, as a human-readable string.", + "type": "string" + } + }, + "required": [ + "cluster_uuid", + "mode", + "skip_unavailable", + "transport_compress", + "status", + "version", + "nodes_count", + "shards_count", + "indices_count", + "indices_total_size_in_bytes", + "max_heap_in_bytes", + "mem_total_in_bytes" + ] + }, + "cluster.stats.CCSUsageStats": { + "type": "object", + "properties": { + "total": { + "description": "The total number of cross-cluster search requests that have been executed by the cluster.", + "type": "number" + }, + "success": { + "description": "The total number of cross-cluster search requests that have been successfully executed by the cluster.", + "type": "number" + }, + "skipped": { + "description": "The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped.", + "type": "number" + }, + "took": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + }, + "took_mrt_true": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + }, + "took_mrt_false": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + }, + "remotes_per_search_max": { + "description": "The maximum number of remote clusters that were queried in a single cross-cluster search request.", + "type": "number" + }, + "remotes_per_search_avg": { + "description": "The average number of remote clusters that were queried in a single cross-cluster search request.", + "type": "number" + }, + "failure_reasons": { + "description": "Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "features": { + "description": "The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both `async` and `wildcard`).", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "clients": { + "description": "Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as `kibana` or `elasticsearch`) are counted.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "clusters": { + "description": "Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name `(local)`.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageClusterStats" + } + } + }, + "required": [ + "total", + "success", + "skipped", + "took", + "remotes_per_search_max", + "remotes_per_search_avg", + "failure_reasons", + "features", + "clients", + "clusters" + ] + }, + "cluster.stats.CCSUsageTimeValue": { + "type": "object", + "properties": { + "max": { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + }, + "avg": { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + }, + "p90": { + "$ref": "#/components/schemas/_types.DurationValueUnitMillis" + } + }, + "required": [ + "max", + "avg", + "p90" + ] + }, + "cluster.stats.CCSUsageClusterStats": { + "type": "object", + "properties": { + "total": { + "description": "The total number of successful (not skipped) cross-cluster search requests that were executed against this cluster. This may include requests where partial results were returned, but not requests in which the cluster has been skipped entirely.", + "type": "number" + }, + "skipped": { + "description": "The total number of cross-cluster search requests for which this cluster was skipped.", + "type": "number" + }, + "took": { + "$ref": "#/components/schemas/cluster.stats.CCSUsageTimeValue" + } + }, + "required": [ + "total", + "skipped", + "took" + ] + }, "nodes._types.NodesResponseBase": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 8cf81ee89f..35e3357539 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -115367,6 +115367,380 @@ }, "specLocation": "cluster/state/ClusterStateResponse.ts#L22-L29" }, + { + "kind": "interface", + "name": { + "name": "CCSStats", + "namespace": "cluster.stats" + }, + "properties": [ + { + "description": "Contains remote cluster settings and metrics collected from them.\nThe keys are cluster names, and the values are per-cluster data.\nOnly present if `include_remotes` option is set to true.", + "name": "clusters", + "required": false, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "RemoteClusterInfo", + "namespace": "cluster.stats" + } + } + } + }, + { + "description": "Information about cross-cluster search usage.", + "name": "_search", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CCSUsageStats", + "namespace": "cluster.stats" + } + } + }, + { + "description": "Information about ES|QL cross-cluster query usage.", + "name": "_esql", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "CCSUsageStats", + "namespace": "cluster.stats" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L591-L606" + }, + { + "kind": "interface", + "name": { + "name": "CCSUsageClusterStats", + "namespace": "cluster.stats" + }, + "properties": [ + { + "description": "The total number of successful (not skipped) cross-cluster search requests that were executed against this cluster. This may include requests where partial results were returned, but not requests in which the cluster has been skipped entirely.", + "name": "total", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The total number of cross-cluster search requests for which this cluster was skipped.", + "name": "skipped", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Statistics about the time taken to execute requests against this cluster.", + "name": "took", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CCSUsageTimeValue", + "namespace": "cluster.stats" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L677-L684" + }, + { + "kind": "interface", + "name": { + "name": "CCSUsageStats", + "namespace": "cluster.stats" + }, + "properties": [ + { + "description": "The total number of cross-cluster search requests that have been executed by the cluster.", + "name": "total", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The total number of cross-cluster search requests that have been successfully executed by the cluster.", + "name": "success", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped.", + "name": "skipped", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Statistics about the time taken to execute cross-cluster search requests.", + "name": "took", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CCSUsageTimeValue", + "namespace": "cluster.stats" + } + } + }, + { + "description": "Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `true`.", + "name": "took_mrt_true", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "CCSUsageTimeValue", + "namespace": "cluster.stats" + } + } + }, + { + "description": "Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `false`.", + "name": "took_mrt_false", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "CCSUsageTimeValue", + "namespace": "cluster.stats" + } + } + }, + { + "description": "The maximum number of remote clusters that were queried in a single cross-cluster search request.", + "name": "remotes_per_search_max", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The average number of remote clusters that were queried in a single cross-cluster search request.", + "name": "remotes_per_search_avg", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + }, + { + "description": "Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason.", + "name": "failure_reasons", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + }, + { + "description": "The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both `async` and `wildcard`).", + "name": "features", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + }, + { + "description": "Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as `kibana` or `elasticsearch`) are counted.", + "name": "clients", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + }, + { + "description": "Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name `(local)`.", + "name": "clusters", + "required": true, + "type": { + "kind": "dictionary_of", + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "CCSUsageClusterStats", + "namespace": "cluster.stats" + } + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L641-L666" + }, + { + "kind": "interface", + "name": { + "name": "CCSUsageTimeValue", + "namespace": "cluster.stats" + }, + "properties": [ + { + "description": "The maximum time taken to execute a request, in milliseconds.", + "name": "max", + "required": true, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" + } + } + }, + { + "description": "The average time taken to execute a request, in milliseconds.", + "name": "avg", + "required": true, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" + } + } + }, + { + "description": "The 90th percentile of the time taken to execute requests, in milliseconds.", + "name": "p90", + "required": true, + "type": { + "kind": "instance_of", + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "UnitMillis", + "namespace": "_types" + } + } + ], + "type": { + "name": "DurationValue", + "namespace": "_types" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L668-L675" + }, { "kind": "interface", "name": { @@ -117397,6 +117771,199 @@ ], "specLocation": "cluster/stats/types.ts#L541-L568" }, + { + "kind": "interface", + "name": { + "name": "RemoteClusterInfo", + "namespace": "cluster.stats" + }, + "properties": [ + { + "description": "The UUID of the remote cluster.", + "name": "cluster_uuid", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The connection mode used to communicate with the remote cluster.", + "name": "mode", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "The `skip_unavailable` setting used for this remote cluster.", + "name": "skip_unavailable", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "description": "Transport compression setting used for this remote cluster.", + "name": "transport_compress", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "Health status of the cluster, based on the state of its primary and replica shards.", + "name": "status", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "HealthStatus", + "namespace": "_types" + } + } + }, + { + "description": "The list of Elasticsearch versions used by the nodes on the remote cluster.", + "name": "version", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "VersionString", + "namespace": "_types" + } + } + } + }, + { + "description": "The total count of nodes in the remote cluster.", + "name": "nodes_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The total number of shards in the remote cluster.", + "name": "shards_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "The total number of indices in the remote cluster.", + "name": "indices_count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Total data set size, in bytes, of all shards assigned to selected nodes.", + "name": "indices_total_size_in_bytes", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "Total data set size of all shards assigned to selected nodes, as a human-readable string.", + "name": "indices_total_size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster.", + "name": "max_heap_in_bytes", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "Maximum amount of memory available for use by the heap across the nodes of the remote cluster, as a human-readable string.", + "name": "max_heap", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "description": "Total amount, in bytes, of physical memory across the nodes of the remote cluster.", + "name": "mem_total_in_bytes", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "description": "Total amount of physical memory across the nodes of the remote cluster, as a human-readable string.", + "name": "mem_total", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "cluster/stats/types.ts#L608-L639" + }, { "kind": "request", "attachedBehaviors": [ @@ -117475,7 +118042,7 @@ "name": "Response", "namespace": "cluster.stats" }, - "specLocation": "cluster/stats/ClusterStatsResponse.ts#L53-L55" + "specLocation": "cluster/stats/ClusterStatsResponse.ts#L57-L59" }, { "kind": "interface", @@ -117744,9 +118311,21 @@ "namespace": "_types" } } + }, + { + "description": "Cross-cluster stats", + "name": "ccs", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "CCSStats", + "namespace": "cluster.stats" + } + } } ], - "specLocation": "cluster/stats/ClusterStatsResponse.ts#L25-L51" + "specLocation": "cluster/stats/ClusterStatsResponse.ts#L25-L55" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 7158e723f1..5afcef86c8 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9538,6 +9538,39 @@ export interface ClusterStateRequest extends RequestBase { export type ClusterStateResponse = any +export interface ClusterStatsCCSStats { + clusters?: Record + _search: ClusterStatsCCSUsageStats + _esql?: ClusterStatsCCSUsageStats +} + +export interface ClusterStatsCCSUsageClusterStats { + total: integer + skipped: integer + took: ClusterStatsCCSUsageTimeValue +} + +export interface ClusterStatsCCSUsageStats { + total: integer + success: integer + skipped: integer + took: ClusterStatsCCSUsageTimeValue + took_mrt_true?: ClusterStatsCCSUsageTimeValue + took_mrt_false?: ClusterStatsCCSUsageTimeValue + remotes_per_search_max: integer + remotes_per_search_avg: double + failure_reasons: Record + features: Record + clients: Record + clusters: Record +} + +export interface ClusterStatsCCSUsageTimeValue { + max: DurationValue + avg: DurationValue + p90: DurationValue +} + export interface ClusterStatsCharFilterTypes { analyzer_types: ClusterStatsFieldTypes[] built_in_analyzers: ClusterStatsFieldTypes[] @@ -9761,6 +9794,24 @@ export interface ClusterStatsOperatingSystemMemoryInfo { used_percent: integer } +export interface ClusterStatsRemoteClusterInfo { + cluster_uuid: string + mode: string + skip_unavailable: boolean + transport_compress: string + status: HealthStatus + version: VersionString[] + nodes_count: integer + shards_count: integer + indices_count: integer + indices_total_size_in_bytes: long + indices_total_size?: string + max_heap_in_bytes: long + max_heap?: string + mem_total_in_bytes: long + mem_total?: string +} + export interface ClusterStatsRequest extends RequestBase { node_id?: NodeIds include_remotes?: boolean @@ -9793,6 +9844,7 @@ export interface ClusterStatsStatsResponseBase extends NodesNodesResponseBase { nodes: ClusterStatsClusterNodes status: HealthStatus timestamp: long + ccs: ClusterStatsCCSStats } export interface ConnectorConnector { diff --git a/specification/cluster/stats/ClusterStatsResponse.ts b/specification/cluster/stats/ClusterStatsResponse.ts index b6a440811d..322050f9e2 100644 --- a/specification/cluster/stats/ClusterStatsResponse.ts +++ b/specification/cluster/stats/ClusterStatsResponse.ts @@ -20,7 +20,7 @@ import { NodesResponseBase } from '@nodes/_types/NodesResponseBase' import { HealthStatus, Name, Uuid } from '@_types/common' import { long } from '@_types/Numeric' -import { ClusterIndices, ClusterNodes } from './types' +import { CCSStats, ClusterIndices, ClusterNodes } from './types' export class StatsResponseBase extends NodesResponseBase { /** @@ -48,6 +48,10 @@ export class StatsResponseBase extends NodesResponseBase { * Unix timestamp, in milliseconds, for the last time the cluster statistics were refreshed. */ timestamp: long + /** + * Cross-cluster stats + */ + ccs: CCSStats } export class Response { diff --git a/specification/cluster/stats/types.ts b/specification/cluster/stats/types.ts index 3e97a8e45f..36c93125dd 100644 --- a/specification/cluster/stats/types.ts +++ b/specification/cluster/stats/types.ts @@ -18,7 +18,7 @@ */ import { Dictionary } from '@spec_utils/Dictionary' -import { ByteSize, Name, VersionString } from '@_types/common' +import { ByteSize, HealthStatus, Name, VersionString } from '@_types/common' import { double, integer, long } from '@_types/Numeric' import { CompletionStats, @@ -587,3 +587,98 @@ export class IndexingPressureMemorySummary { replica_in_bytes: long replica_rejections?: long } + +export class CCSStats { + /** + * Contains remote cluster settings and metrics collected from them. + * The keys are cluster names, and the values are per-cluster data. + * Only present if `include_remotes` option is set to true. + */ + clusters?: Dictionary + /** + * Information about cross-cluster search usage. + */ + _search: CCSUsageStats + /** + * Information about ES|QL cross-cluster query usage. + */ + _esql?: CCSUsageStats +} + +export class RemoteClusterInfo { + /** The UUID of the remote cluster. */ + cluster_uuid: string + /** The connection mode used to communicate with the remote cluster. */ + mode: string + /** The `skip_unavailable` setting used for this remote cluster. */ + skip_unavailable: boolean + /** Transport compression setting used for this remote cluster. */ + transport_compress: string + /** Health status of the cluster, based on the state of its primary and replica shards. */ + status: HealthStatus + /** The list of Elasticsearch versions used by the nodes on the remote cluster. */ + version: VersionString[] + /** The total count of nodes in the remote cluster. */ + nodes_count: integer + /** The total number of shards in the remote cluster. */ + shards_count: integer + /** The total number of indices in the remote cluster. */ + indices_count: integer + /** Total data set size, in bytes, of all shards assigned to selected nodes. */ + indices_total_size_in_bytes: long + /** Total data set size of all shards assigned to selected nodes, as a human-readable string. */ + indices_total_size?: string + /** Maximum amount of memory, in bytes, available for use by the heap across the nodes of the remote cluster. */ + max_heap_in_bytes: long + /** Maximum amount of memory available for use by the heap across the nodes of the remote cluster, as a human-readable string. */ + max_heap?: string + /** Total amount, in bytes, of physical memory across the nodes of the remote cluster. */ + mem_total_in_bytes: long + /** Total amount of physical memory across the nodes of the remote cluster, as a human-readable string. */ + mem_total?: string +} + +export class CCSUsageStats { + /** The total number of cross-cluster search requests that have been executed by the cluster. */ + total: integer + /** The total number of cross-cluster search requests that have been successfully executed by the cluster. */ + success: integer + /** The total number of cross-cluster search requests (successful or failed) that had at least one remote cluster skipped. */ + skipped: integer + /** Statistics about the time taken to execute cross-cluster search requests. */ + took: CCSUsageTimeValue + /** Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `true`. */ + took_mrt_true?: CCSUsageTimeValue + /** Statistics about the time taken to execute cross-cluster search requests for which the `ccs_minimize_roundtrips` setting was set to `false`. */ + took_mrt_false?: CCSUsageTimeValue + /** The maximum number of remote clusters that were queried in a single cross-cluster search request. */ + remotes_per_search_max: integer + /** The average number of remote clusters that were queried in a single cross-cluster search request. */ + remotes_per_search_avg: double + /** Statistics about the reasons for cross-cluster search request failures. The keys are the failure reason names and the values are the number of requests that failed for that reason. */ + failure_reasons: Dictionary + /** The keys are the names of the search feature, and the values are the number of requests that used that feature. Single request can use more than one feature (e.g. both `async` and `wildcard`). */ + features: Dictionary + /** Statistics about the clients that executed cross-cluster search requests. The keys are the names of the clients, and the values are the number of requests that were executed by that client. Only known clients (such as `kibana` or `elasticsearch`) are counted. */ + clients: Dictionary + /** Statistics about the clusters that were queried in cross-cluster search requests. The keys are cluster names, and the values are per-cluster telemetry data. This also includes the local cluster itself, which uses the name `(local)`. */ + clusters: Dictionary +} + +export class CCSUsageTimeValue { + /** The maximum time taken to execute a request, in milliseconds. */ + max: DurationValue + /** The average time taken to execute a request, in milliseconds. */ + avg: DurationValue + /** The 90th percentile of the time taken to execute requests, in milliseconds. */ + p90: DurationValue +} + +export class CCSUsageClusterStats { + /** The total number of successful (not skipped) cross-cluster search requests that were executed against this cluster. This may include requests where partial results were returned, but not requests in which the cluster has been skipped entirely. */ + total: integer + /** The total number of cross-cluster search requests for which this cluster was skipped. */ + skipped: integer + /** Statistics about the time taken to execute requests against this cluster. */ + took: CCSUsageTimeValue +}