Skip to content

Instantly share code, notes, and snippets.

@inqueue
Created February 2, 2016 22:47
Show Gist options
  • Save inqueue/305dd93603dfd3ea8245 to your computer and use it in GitHub Desktop.
Save inqueue/305dd93603dfd3ea8245 to your computer and use it in GitHub Desktop.
Use this template to enable increase refresh_interval to 30s.
{
"template": "logstash-*",
"order": 0,
"settings": {
"index": {
"refresh_interval": "30s"
}
},
"mappings": {
"_default_": {
"dynamic_templates": [{
"message_field": {
"mapping": {
"index": "analyzed",
"omit_norms": true,
"type": "string"
},
"match_mapping_type": "string",
"match": "message"
}
}, {
"string_fields": {
"mapping": {
"index": "analyzed",
"omit_norms": true,
"type": "string",
"fields": {
"raw": {
"ignore_above": 256,
"index": "not_analyzed",
"type": "string"
}
}
},
"match_mapping_type": "string",
"match": "*"
}
}],
"_all": {
"omit_norms": true,
"enabled": true
},
"properties": {
"geoip": {
"dynamic": true,
"type": "object",
"properties": {
"location": {
"type": "geo_point"
}
}
},
"@version": {
"index": "not_analyzed",
"type": "string"
}
}
}
}
}
@inqueue
Copy link
Author

inqueue commented Feb 3, 2016

PUT _template/logstash
<paste json here>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment