Last active
January 2, 2018 15:02
-
-
Save portante/f8cfecad1c6b69cdc1736ce464501d6f to your computer and use it in GitHub Desktop.
Aggregated Logging ".operations.*" template for N primary shards
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sh-4.2$ cat operations.template.json | |
{ | |
"order" : 20, | |
"template" : ".operations.*", | |
"settings" : { | |
"index" : { | |
"number_of_shards" : "3" | |
} | |
} | |
} | |
sh-4.2$ cat put-template.sh | |
#!/bin/bash | |
ES_URL='https://localhost:9200' | |
curl_put='curl -s -X PUT --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key' | |
$curl_put $ES_URL/_template/${1}?pretty -d @${2} | |
sh-4.2$ cat templates.sh | |
#!/bin/bash | |
ES_URL='https://localhost:9200' | |
curl_get='curl -s -X GET --cacert /etc/elasticsearch/secret/admin-ca --cert /etc/elasticsearch/secret/admin-cert --key /etc/elasticsearch/secret/admin-key' | |
date | |
$curl_get $ES_URL/_template?pretty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment