[ https://issues.apache.org/jira/browse/METRON-1310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16246165#comment-16246165 ]
ASF GitHub Bot commented on METRON-1310: ---------------------------------------- Github user nickwallen commented on a diff in the pull request: https://github.com/apache/metron/pull/838#discussion_r150038546 --- Diff: metron-deployment/packaging/ambari/metron-mpack/src/main/resources/common-services/METRON/CURRENT/package/scripts/indexing_master.py --- @@ -141,38 +141,43 @@ def elasticsearch_template_install(self, env): File(params.meta_index_path, mode=0755, - content=StaticFile('meta_index.mapping') + content=StaticFile('meta_index.template') ) - bro_cmd = ambari_format( - 'curl -s -XPOST http://{es_http_url}/_template/bro_index -d @{bro_index_path}') + bro_cmd = ambari_format('curl -s -XPOST http://{es_http_url}/_template/bro_index -d @{bro_index_path}') Execute(bro_cmd, logoutput=True) - snort_cmd = ambari_format( - 'curl -s -XPOST http://{es_http_url}/_template/snort_index -d @{snort_index_path}') + + snort_cmd = ambari_format('curl -s -XPOST http://{es_http_url}/_template/snort_index -d @{snort_index_path}') Execute(snort_cmd, logoutput=True) - yaf_cmd = ambari_format( - 'curl -s -XPOST http://{es_http_url}/_template/yaf_index -d @{yaf_index_path}') + + yaf_cmd = ambari_format('curl -s -XPOST http://{es_http_url}/_template/yaf_index -d @{yaf_index_path}') Execute(yaf_cmd, logoutput=True) - error_cmd = ambari_format( - 'curl -s -XPOST http://{es_http_url}/_template/error_index -d @{error_index_path}') - Execute(error_cmd, logoutput=True) - error_cmd = ambari_format( - 'curl -s -XPOST http://{es_http_url}/metaalert_index -d @{meta_index_path}') + + error_cmd = ambari_format('curl -s -XPOST http://{es_http_url}/_template/error_index -d @{error_index_path}') Execute(error_cmd, logoutput=True) + meta_cmd = ambari_format('curl -s -XPOST http://{es_http_url}/_template/metaalert_index -d @{meta_index_path}') + Execute(meta_cmd, logoutput=True) + def elasticsearch_template_delete(self, env): from params import params env.set_params(params) - bro_cmd = ambari_format('curl -s -XDELETE "http://{es_http_url}/bro_index*"') + bro_cmd = ambari_format('curl -s -XDELETE "http://{es_http_url}/_template/bro_index"') --- End diff -- Let's delete the template, rather than the entire index. > "Template Delete" Action Deletes Search Indices > ----------------------------------------------- > > Key: METRON-1310 > URL: https://issues.apache.org/jira/browse/METRON-1310 > Project: Metron > Issue Type: Bug > Affects Versions: 0.4.1 > Reporter: Nick Allen > Assignee: Nick Allen > Fix For: Next + 1 > > > The "Elasticsearch Template Delete" service action available within the > Indexing service actually deletes the search indices, rather than just > deleting the template definitions themselves. -- This message was sent by Atlassian JIRA (v6.4.14#64029)