Adapt create_bwc_indexes.py to new monitoring index structure

Original commit: elastic/x-pack-elasticsearch@a881f78eb2
This commit is contained in:
Boaz Leskes 2017-07-07 18:01:32 +02:00
parent 65a0d44b2f
commit 04125b5ca2
1 changed files with 2 additions and 5 deletions

View File

@ -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)