Uploading an Elastic Search Template to Apache Metron
-
More details on how to create a template here: https://datahovel.com/2018/11/27/how-to-define-elastic-search-templates-for-apache-metron/
-
Command to upload the template
export ELASTICSEARCH_MASTER=condla0.field.hortonworks.com:9200
export PARSER_NAME=squid
# upload template
curl -X POST $ELASTICSEARCH_MASTER/_template/$PARSER_index -d @template.json
## expected output:
## {"acknowledged":true}
# check if correct template was created
curl -X GET $ELASTICSEARCH_MASTER/_template | python -m json.tool | grep squid
## expected output:
## "squid_index": {
## "squid_doc": {
## "template": "squid_index*"