Skip to content

Instantly share code, notes, and snippets.

@osssubb
Created August 5, 2013 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osssubb/6154620 to your computer and use it in GitHub Desktop.
Save osssubb/6154620 to your computer and use it in GitHub Desktop.
logstash_template
curl -XPUT http://10.0.4.24:9200/_template/logstash -d '
{
"template" : "logstash*",
"settings" : {
"number_of_shards" : 1,
"index.refresh_interval" : "10s",
"index.query.default_field": "@message"},
"mappings": {
"_default_": {
"_all": { "enabled": false },
"_source": { "compress": false },
"properties": {
"@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