Unable to view my custom index patterns in kibana

Hi all, I am doing an install of Elasticsearch 7.6 version on my kubernetes cluster. I have an index-template json which creates custom index patterns. my template.json looks like below. When i create the template, I get mapper_parsing_exception

{ "error" : { "root_cause" : [ { "type" : "mapper_parsing_exception", "reason" : "Root mapping definition has unsupported parameters: [doc : {dynamic_templates=[{strings_as_text={mapping={type=text}, match_mapping_type=string}}], properties={logline={analyzer=keyword, type=text}, kubernetes={properties={pod_name={analyzer=keyword, type=text}}}, component={analyzer=keyword, type=text}, @timestamp={type=date}, beat={properties={hostname={ignore_above=1024, type=keyword}, timezone={ignore_above=1024, type=keyword}, name={ignore_above=1024, type=keyword}, version={ignore_above=1024, type=keyword}}}, namespace={analyzer=keyword, type=text}, error={properties={code={type=long}, message={norms=false, type=text}, type={ignore_above=1024, type=keyword}}}, fields={type=object}}}]" } ]

I read the docs for 7.6 wherein there is removal for mapping types, i tried removing the doc from the template but I don't see the index patterns getting created in Kibana . also the _cat/indices shows docs.count as 0 for those indexes after I remove doc type. To summarize, when I dont include _doc in the template, the POST call is successful, but i see no patterns created in Kibana Discovery. could someone help me with whats wrong with my template.

</POST _template/containerlogs?pretty
{
"index_patterns":[
"foo-", "bar-"
],
"mappings":{
"doc":{
"dynamic_templates":[
{
"strings_as_text":{
"match_mapping_type":"string",
"mapping":{
"type":"text"
}
}
}
],
"properties":{
"@timestamp":{
"type":"date"
},
"beat":{
"properties":{
"hostname":{
"ignore_above":1024,
"type":"keyword"
},
"name":{
"ignore_above":1024,
"type":"keyword"
},
"timezone":{
"ignore_above":1024,
"type":"keyword"
},
"version":{
"ignore_above":1024,
"type":"keyword"
}
}
},
"logline":{
"type":"text",
"analyzer": "keyword"
},
"component":{
"type":"text",
"analyzer": "keyword"
},
"namespace":{
"type":"text",
"analyzer": "keyword"
},
"kubernetes":{
"properties":{
"pod_name":{
"type":"text",
"analyzer": "keyword"
}
}
},
"error":{
"properties":{
"code":{
"type":"long"
},
"message":{
"norms":false,
"type":"text"
},
"type":{
"ignore_above":1024,
"type":"keyword"
}
}
},
"fields":{
"type":"object"
}
}
}
},
"order":2,
"settings":{
"index":{
"mapping":{
"total_fields":{
"limit":10000
}
},
"unassigned": {
"node_left": {
"delayed_timeout": "60m"
}
},
"number_of_routing_shards":30,
"refresh_interval":"5s"
}
}
}>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.