old_console/docker/compose/config/elk/elasticsearch/elk-post-hooks.sh
2024-11-02 14:12:45 +03:00

6 lines
557 B
Bash

#!/bin/bash
echo "Apply elasticsearch index templates"
curl -w "\n" --user elastic:changeme -X PUT "localhost:9200/_component_template/normalized_component" -H 'Content-Type: application/json' -d"$(< /mapping/normalized-component.json)"
curl -w "\n" --user elastic:changeme -X PUT "localhost:9200/_index_template/normalized" -H 'Content-Type: application/json' -d"$(< /mapping/normalizer-index.template.json)"
# curl -X PUT "localhost:9200/_index_template/arma-*_template?pretty" -H 'Content-Type: application/json' -d"$(< /mapping/normalized-event.json)"