code: def _check_instance(url, insecure):
          
  
          res = grimoire_con(insecure).get(url)
          if res.status_code != 200:
              logger.error("Didn't get 200 OK from url %s", url)
              raise ElasticConnectException
          else:
              try:
                  version_str = res.json()['version']['number']
                  version_major = version_str.split('.')[0]
                  return version_major
              except Exception:
                  logger.error("Could not read proper welcome message from url %s",
                               ElasticSearch.anonymize_url(url))
                  logger.error("Message read: %s", res.text)
                  raise ElasticConnectException
docs: Checks if there is an instance of Elasticsearch in url.
  
          Actually, it checks if GET on the url returns a JSON document
          with a field tagline "You know, for search",
          and a field version.number.
  
          :value      url: url of the instance to check
          :value insecure: don't verify ssl connection (boolean)
          :returns:        major version of Ellasticsearch, as string.