fix: elasticsearch template mapping to parse kubernetes.labels

This commit is contained in:
Matt Condon 2016-10-28 16:29:34 -04:00
parent bc7ae399f8
commit 00f6592d9e

View File

@ -1,22 +1,35 @@
{ {
"template_k8s_logstash" : { "template" : "logstash-*",
"template" : "logstash-*", "settings" : {
"settings" : { "index.refresh_interval" : "5s"
"index.refresh_interval" : "5s" },
}, "mappings" : {
"mappings" : { "_default_" : {
"_default_" : { "dynamic_templates" : [ {
"dynamic_templates" : [ { "kubernetes_labels" : {
"kubernetes_field" : { "path_match" : "kubernetes.labels",
"path_match" : "kubernetes.*", "mapping" : {
"mapping" : { "type" : "object",
"type" : "string", "dynamic_templates" : [ {
"index" : "not_analyzed" "match_mapping_type": "string",
} "path_match" : "*",
"mapping" : {
"type" : "string",
"index" : "not_analyzed"
}
} ]
} }
} ] }
} }, {
"kubernetes_field" : {
"match_mapping_type": "string",
"path_match" : "kubernetes.*",
"mapping" : {
"type" : "string",
"index" : "not_analyzed"
}
}
} ]
} }
} }
} }