Github user anandsubbu commented on the issue: https://github.com/apache/metron/pull/839 +1 (non-binding) works fine, and a much needed fix as well ! If for some reason, we were not able to install the templates during the startup, it would be caught by the service check. Validated this on a full dev environment. For a successful service check, I see this now: ``` 2017-11-10 15:48:06,150 - Checking Elasticsearch templates for Indexing 2017-11-10 15:48:06,151 - Execute['curl -s -XGET "http://node1:9200/_template/yaf_index" | grep -o yaf_index'] {'logoutput': True, 'path': ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'], 'tries': 3, 'user': 'metron', 'try_sleep': 5} yaf_index yaf_index 2017-11-10 15:48:06,343 - Execute['curl -s -XGET "http://node1:9200/_template/error_index" | grep -o error_index'] {'logoutput': True, 'path': ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'], 'tries': 3, 'user': 'metron', 'try_sleep': 5} error_index error_index 2017-11-10 15:48:06,385 - Execute['curl -s -XGET "http://node1:9200/_template/snort_index" | grep -o snort_index'] {'logoutput': True, 'path': ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'], 'tries': 3, 'user': 'metron', 'try_sleep': 5} snort_index snort_index 2017-11-10 15:48:06,433 - Execute['curl -s -XGET "http://node1:9200/_template/bro_index" | grep -o bro_index'] {'logoutput': True, 'path': ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'], 'tries': 3, 'user': 'metron', 'try_sleep': 5} bro_index bro_index 2017-11-10 15:48:06,491 - Execute['curl -s -XGET "http://node1:9200/_template/metaalert_index" | grep -o metaalert_index'] {'logoutput': True, 'path': ['/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'], 'tries': 3, 'user': 'metron', 'try_sleep': 5} metaalert_index ``` And the service check fails when I delete the ES template file. ``` Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/METRON/0.4.2/package/scripts/service_check.py", line 78, in <module> ServiceCheck().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute method(env) File "/var/lib/ambari-agent/cache/common-services/METRON/0.4.2/package/scripts/service_check.py", line 51, in service_check indexing_cmds.service_check(env) File "/var/lib/ambari-agent/cache/common-services/METRON/0.4.2/package/scripts/indexing_commands.py", line 264, in service_check self.check_elasticsearch_templates() File "/var/lib/ambari-agent/cache/common-services/METRON/0.4.2/package/scripts/indexing_commands.py", line 179, in check_elasticsearch_templates metron_service.execute(cmd, user=self.__params.metron_user, err_msg=err_msg) File "/var/lib/ambari-agent/cache/common-services/METRON/0.4.2/package/scripts/metron_service.py", line 257, in execute raise Fail(err_msg) resource_management.core.exceptions.Fail: Missing Elasticsearch index template: name=yaf_index ``` @nickwallen - I see two conflicting files for the commit. Guess this would be need to be resolved first?
---