forked from dadoonet/bano-elastic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinject-all.sh
executable file
·20 lines (14 loc) · 1.33 KB
/
inject-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
source .env.sh
echo Define ingest pipelines with full options
curl $CURL_OPTION -XPUT "$ELASTICSEARCH_URL/_ingest/pipeline/bano" -u elastic:$ELASTIC_PASSWORD -H 'Content-Type: application/json' -d'@elasticsearch-config/ingest-bano.json' ; echo
echo Define bano component templates
curl $CURL_OPTION -XPUT "$ELASTICSEARCH_URL/_component_template/bano-settings" -u elastic:$ELASTIC_PASSWORD -H 'Content-Type: application/json' -d'@elasticsearch-config/component-bano-settings.json' ; echo
curl $CURL_OPTION -XPUT "$ELASTICSEARCH_URL/_component_template/bano-mapping" -u elastic:$ELASTIC_PASSWORD -H 'Content-Type: application/json' -d'@elasticsearch-config/component-bano-mapping.json' ; echo
echo Define the bano template
curl $CURL_OPTION -XPUT "$ELASTICSEARCH_URL/_index_template/bano" -u elastic:$ELASTIC_PASSWORD -H 'Content-Type: application/json' -d'@elasticsearch-config/index-template-bano.json' ; echo
echo Injecting the whole bano dataset into $ELASTICSEARCH_URL
./filebeat.sh "" "-all"
echo Define ingest pipelines empty
curl $CURL_OPTION -XPUT "$ELASTICSEARCH_URL/_ingest/pipeline/bano" -u elastic:$ELASTIC_PASSWORD -H 'Content-Type: application/json' -d'@elasticsearch-config/ingest-bano.json' ; echo
echo Remove existing bano template
curl $CURL_OPTION -XDELETE "$ELASTICSEARCH_URL/_index_template/bano" -u elastic:$ELASTIC_PASSWORD ; echo