Skip to content

Instantly share code, notes, and snippets.

@ageis
Created November 20, 2019 21:44
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 ageis/f21e8d18ffd6a4797fcc52dc3273de8d to your computer and use it in GitHub Desktop.
Save ageis/f21e8d18ffd6a4797fcc52dc3273de8d to your computer and use it in GitHub Desktop.
alertmanager2es index template mappings
{
"template": "alerts-*",
"settings": {
"number_of_shards": 1,
"number_of_replicas": 1,
"index.refresh_interval": "10s",
"index.query.default_field": "groupLabels.alertname"
},
"index_patterns": ["alerts-*"],
"mappings": {
"_doc": {
"dynamic": true,
"date_detection": true,
"properties": {
"@timestamp": { "type": "date", "doc_values": true }
},
"dynamic_templates": [{
"string_fields": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type": "keyword",
"index": "true",
"ignore_above": 1024,
"doc_values": true
}
}
}]
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment