__author__ = 'terry'

import sys
from elasticsearch import Elasticsearch
import time

if __name__ == '__main__':

    time.sleep(5)
    # create a connection to the Elasticsearch database
    client = Elasticsearch(['pureelk-elasticsearch:9200'], retry_on_timeout=True)

    if client.indices.exists(index='pureelk-global-arrays'):
        sys.exit(0)
    else:
        sys.exit(1)
__author__ = 'terry'

import sys
from elasticsearch import Elasticsearch
import time

if __name__ == '__main__':

    time.sleep(5)
    # create a connection to the Elasticsearch database
    client = Elasticsearch(['pureelk-elasticsearch:9200'], retry_on_timeout=True)

    if client.exists(index='.kibana', doc_type='index-pattern',id='pureelk-global-arrays'):
        sys.exit(0)
    else:
        sys.exit(1)
Change the test for pureelk in elasticsearch
Change the test for pureelk in elasticsearch

It makes more sense to test for a specific index pattern rather than
pureelk-global-arrays index. The reason is if someone never adds an
array startup code will try to re-add .kibana data
