Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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