From 04125b5ca2eaed66e8086e3a597ca6b539841763 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Fri, 7 Jul 2017 18:01:32 +0200 Subject: [PATCH] Adapt create_bwc_indexes.py to new monitoring index structure Original commit: elastic/x-pack-elasticsearch@a881f78eb2bd184db1d8be2fe4e2ef36851121ca --- dev-tools/create_bwc_indexes.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/dev-tools/create_bwc_indexes.py b/dev-tools/create_bwc_indexes.py index c5662ae013a..251da452202 100644 --- a/dev-tools/create_bwc_indexes.py +++ b/dev-tools/create_bwc_indexes.py @@ -340,16 +340,13 @@ def wait_for_monitoring_index_to_fill(client, version): def wait_for_monitoring_to_index(doc_type, count): logging.info('Waiting for %s to have count(%s) = %s...' % (monitoring_name, doc_type, count)) wait_for_search(count, lambda: - client.search(index=monitoring_name, doc_type=doc_type, body={"query": {"match_all": {}}})) + client.search(index=monitoring_name, body={"query": {"term": { "type": doc_type }}})) - wait_for_monitoring_to_index('cluster_info', 1) - if parse_version(version) >= parse_version('2.1.0'): - wait_for_monitoring_to_index('node', 1) wait_for_monitoring_to_index('index_stats', 10) wait_for_monitoring_to_index('shards', 10) wait_for_monitoring_to_index('indices_stats', 3) wait_for_monitoring_to_index('node_stats', 3) - wait_for_monitoring_to_index('cluster_state', 3) + wait_for_monitoring_to_index('cluster_stats', 3) wait_for_yellow(version, client, monitoring_name)