---
setup:
- skip:
    features:
    - "headers"
    - "allowed_warnings_regex"
---
Discovery stats:
- skip:
    features:
    - "arbitrary_key"
- do:
    nodes.info:
      node_id: "_master"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- set:
    nodes._arbitrary_key_: "master"
- do:
    nodes.stats:
      metric:
      - "discovery"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- is_true: "cluster_name"
- is_true: "nodes"
- is_true: "nodes.$master.name"
- is_false: "nodes.$master.jvm"
- is_true: "nodes.$master.discovery"
- is_true: "nodes.$master.discovery.cluster_state_queue"
- is_true: "nodes.$master.discovery.published_cluster_states"
- gte:
    nodes.$master.discovery.published_cluster_states.full_states: 0
- gte:
    nodes.$master.discovery.published_cluster_states.incompatible_diffs: 0
- gte:
    nodes.$master.discovery.published_cluster_states.compatible_diffs: 0
- is_true: "nodes.$master.roles"
- do:
    nodes.stats:
      filter_path: "nodes.*.discovery"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- is_false: "cluster_name"
- is_true: "nodes"
- is_false: "nodes.$master.name"
- is_false: "nodes.$master.jvm"
- is_true: "nodes.$master.discovery"
- is_true: "nodes.$master.discovery.cluster_state_queue"
- is_true: "nodes.$master.discovery.published_cluster_states"
- gte:
    nodes.$master.discovery.published_cluster_states.full_states: 0
- gte:
    nodes.$master.discovery.published_cluster_states.incompatible_diffs: 0
- gte:
    nodes.$master.discovery.published_cluster_states.compatible_diffs: 0
- is_false: "nodes.$master.roles"
---
Master timing stats:
- requires:
    test_runner_features:
    - "arbitrary_key"
    cluster_features:
    - "gte_v7.16.0"
    reason: "master timing stats added in 7.16.0"
- do:
    nodes.info:
      node_id: "_master"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- set:
    nodes._arbitrary_key_: "master"
- do:
    nodes.stats:
      metric:
      - "discovery"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- gte:
    nodes.$master.discovery.cluster_state_update.unchanged.count: 0
- gte:
    nodes.$master.discovery.cluster_state_update.unchanged.computation_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.unchanged.notification_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.count: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.computation_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.publication_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.context_construction_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.commit_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.completion_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.master_apply_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.notification_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.count: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.computation_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.publication_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.context_construction_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.commit_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.completion_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.master_apply_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.notification_time_millis: 0
- is_false: "nodes.$master.discovery.cluster_state_update.unchanged.computation_time"
- is_false: "nodes.$master.discovery.cluster_state_update.unchanged.notification_time"
- is_false: "nodes.$master.discovery.cluster_state_update.success.computation_time"
- is_false: "nodes.$master.discovery.cluster_state_update.success.publication_time"
- is_false: "nodes.$master.discovery.cluster_state_update.success.context_construction_time"
- is_false: "nodes.$master.discovery.cluster_state_update.success.commit_time"
- is_false: "nodes.$master.discovery.cluster_state_update.success.completion_time"
- is_false: "nodes.$master.discovery.cluster_state_update.success.master_apply_time"
- is_false: "nodes.$master.discovery.cluster_state_update.success.notification_time"
- is_false: "nodes.$master.discovery.cluster_state_update.failure.computation_time"
- is_false: "nodes.$master.discovery.cluster_state_update.failure.publication_time"
- is_false: "nodes.$master.discovery.cluster_state_update.failure.context_construction_time"
- is_false: "nodes.$master.discovery.cluster_state_update.failure.commit_time"
- is_false: "nodes.$master.discovery.cluster_state_update.failure.completion_time"
- is_false: "nodes.$master.discovery.cluster_state_update.failure.master_apply_time"
- is_false: "nodes.$master.discovery.cluster_state_update.failure.notification_time"
- do:
    nodes.stats:
      metric:
      - "discovery"
      human: true
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- gte:
    nodes.$master.discovery.cluster_state_update.unchanged.count: 0
- gte:
    nodes.$master.discovery.cluster_state_update.unchanged.computation_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.unchanged.notification_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.count: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.computation_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.publication_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.context_construction_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.commit_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.completion_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.master_apply_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.success.notification_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.count: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.computation_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.publication_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.context_construction_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.commit_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.completion_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.master_apply_time_millis: 0
- gte:
    nodes.$master.discovery.cluster_state_update.failure.notification_time_millis: 0
- is_true: "nodes.$master.discovery.cluster_state_update.unchanged.computation_time"
- is_true: "nodes.$master.discovery.cluster_state_update.unchanged.notification_time"
- is_true: "nodes.$master.discovery.cluster_state_update.success.computation_time"
- is_true: "nodes.$master.discovery.cluster_state_update.success.publication_time"
- is_true: "nodes.$master.discovery.cluster_state_update.success.context_construction_time"
- is_true: "nodes.$master.discovery.cluster_state_update.success.commit_time"
- is_true: "nodes.$master.discovery.cluster_state_update.success.completion_time"
- is_true: "nodes.$master.discovery.cluster_state_update.success.master_apply_time"
- is_true: "nodes.$master.discovery.cluster_state_update.success.notification_time"
- is_true: "nodes.$master.discovery.cluster_state_update.failure.computation_time"
- is_true: "nodes.$master.discovery.cluster_state_update.failure.publication_time"
- is_true: "nodes.$master.discovery.cluster_state_update.failure.context_construction_time"
- is_true: "nodes.$master.discovery.cluster_state_update.failure.commit_time"
- is_true: "nodes.$master.discovery.cluster_state_update.failure.completion_time"
- is_true: "nodes.$master.discovery.cluster_state_update.failure.master_apply_time"
- is_true: "nodes.$master.discovery.cluster_state_update.failure.notification_time"
---
Master cluster applier stats:
- requires:
    test_runner_features:
    - "arbitrary_key"
    cluster_features:
    - "gte_v7.16.0"
    reason: "Cluster state applier stats available since 7.16.0"
- do:
    nodes.info:
      node_id: "_master"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- set:
    nodes._arbitrary_key_: "master"
- do:
    nodes.stats:
      metric:
      - "discovery"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- is_true: "nodes.$master.discovery.cluster_applier_stats.recordings"
- is_true: "nodes.$master.discovery.cluster_applier_stats.recordings.0.name"
- gte:
    nodes.$master.discovery.cluster_applier_stats.recordings.0.cumulative_execution_count: 1
- gte:
    nodes.$master.discovery.cluster_applier_stats.recordings.0.cumulative_execution_time_millis: 1
---
Master serialization stats:
- requires:
    test_runner_features:
    - "arbitrary_key"
    cluster_features:
    - "gte_v7.16.0"
    reason: "master serialization stats added in 7.16.0"
- do:
    nodes.info:
      node_id: "_master"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- set:
    nodes._arbitrary_key_: "master"
- do:
    nodes.stats:
      metric:
      - "discovery"
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- gte:
    nodes.$master.discovery.serialized_cluster_states.full_states.count: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.full_states.uncompressed_size_in_bytes: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.full_states.compressed_size_in_bytes: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.diffs.count: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.diffs.uncompressed_size_in_bytes: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.diffs.compressed_size_in_bytes: 0
- is_false: "nodes.$master.discovery.serialized_cluster_states.full_states.uncompressed_size"
- is_false: "nodes.$master.discovery.serialized_cluster_states.full_states.compressed_size"
- is_false: "nodes.$master.discovery.serialized_cluster_states.diffs.uncompressed_size"
- is_false: "nodes.$master.discovery.serialized_cluster_states.diffs.compressed_size"
- do:
    nodes.stats:
      metric:
      - "discovery"
      human: true
    headers:
      Content-Type: "application/vnd.elasticsearch+json;compatible-with=8"
      Accept: "application/vnd.elasticsearch+json;compatible-with=8"
    allowed_warnings_regex:
    - "Use of the \\[max_size\\] rollover condition has been deprecated in favour\
      \ of the \\[max_primary_shard_size\\] condition and will be removed in a later\
      \ version"
    - "Parameter \\[confidence_interval\\] in \\[index_options\\] for dense_vector\
      \ field \\[[^\\]]+\\] is deprecated and will be removed in a future version"
- gte:
    nodes.$master.discovery.serialized_cluster_states.full_states.count: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.full_states.uncompressed_size_in_bytes: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.full_states.compressed_size_in_bytes: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.diffs.count: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.diffs.uncompressed_size_in_bytes: 0
- gte:
    nodes.$master.discovery.serialized_cluster_states.diffs.compressed_size_in_bytes: 0
- is_true: "nodes.$master.discovery.serialized_cluster_states.full_states.uncompressed_size"
- is_true: "nodes.$master.discovery.serialized_cluster_states.full_states.compressed_size"
- is_true: "nodes.$master.discovery.serialized_cluster_states.diffs.uncompressed_size"
- is_true: "nodes.$master.discovery.serialized_cluster_states.diffs.compressed_size"
