Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@frozenfoxx
Created September 6, 2013 20:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save frozenfoxx/6469903 to your computer and use it in GitHub Desktop.
Save frozenfoxx/6469903 to your computer and use it in GitHub Desktop.
#!/bin/bash
#curl -XPUT 'http://logmon.myworkplace.local:9200/_template/template_logstash/' -d '
curl -XPUT 'http://localhost:9200/_template/template_logstash/' -d '
{
"template": "logstash-*",
"settings" : {
"index" : {
"query" : { "default_field" : "@message" },
"store" : { "compress" : { "stored" : true, "tv": true } }
}
},
"mappings": {
"_default_": {
"_all" : { "enabled" : false },
"_source": { "compress": true },
"properties" : {
"@fields": { "type": "object", "dynamic": true, "path": "full" },
"@message" : { "type" : "string", "index" : "analyzed" },
"@source" : { "type" : "string", "index" : "not_analyzed" },
"@source_host" : { "type" : "string", "index" : "not_analyzed" },
"@source_path" : { "type" : "string", "index" : "not_analyzed" },
"@tags": { "type": "string", "index" : "not_analyzed" },
"@timestamp" : { "type" : "date", "index" : "not_analyzed" },
"@type" : { "type" : "string", "index" : "not_analyzed" }
}
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment