Last active
September 14, 2017 15:15
-
-
Save jworl/d89b6aa8d1958960757059cbdb154daf to your computer and use it in GitHub Desktop.
elasticsearch template used by logstash for output
This file contains 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
# Create logstash template for pipeline | |
LOGSTASH_TEMPLATE() { | |
pipeline=$1 | |
curl -XPUT http://localhost:9200/_template/${pipeline}?pretty -H 'Content-Type: application/json' -d' | |
{ | |
"order" : 0, | |
"version" : 50002, | |
"template" : "${pipeline}-*", | |
"settings" : { | |
"index" : { | |
"number_of_shards": 3, | |
"number_of_replicas": 1, | |
"refresh_interval" : "30s" | |
} | |
}, | |
"mappings" : { | |
"stat" : { | |
"properties" : { | |
"@timestamp" : { | |
"type" : "date" | |
}, | |
"excluded" : { | |
"type" : "long" | |
}, | |
"extracted" : { | |
"type" : "long" | |
}, | |
"unknown" : { | |
"type" : "long" | |
} | |
} | |
} | |
}, | |
"aliases" : { } | |
} | |
' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment