Example #1
0
    def check_elasticsearch_templates(self):
        for template_name in self.get_templates():

            # check for the index template
            cmd = "curl -s -XGET \"http://{0}/_template/{1}\" | grep -o {1}"
            err_msg = "Missing Elasticsearch index template: name={0}"
            metron_service.execute(cmd=cmd.format(self.__params.es_http_url,
                                                  template_name),
                                   user=self.__params.metron_user,
                                   err_msg=err_msg.format(template_name))
    def check_elasticsearch_templates(self):
        for template_name in self.get_templates():

            # check for the index template
            cmd = "curl -s -XGET \"http://{0}/_template/{1}\" | grep -o {1}"
            err_msg="Missing Elasticsearch index template: name={0}"
            metron_service.execute(
              cmd=cmd.format(self.__params.es_http_url, template_name),
              user=self.__params.metron_user,
              err_msg=err_msg.format(template_name))