Skip to content

Instantly share code, notes, and snippets.

@jordansissel
Forked from frozenfoxx/gist:6469903
Last active December 22, 2015 12:08
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 jordansissel/6469980 to your computer and use it in GitHub Desktop.
Save jordansissel/6469980 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
},
"properties": {
"message": {
"type": "string",
"index": "analyzed"
},
"host": {
"type": "string",
"index": "not_analyzed"
},
"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