Mapping Types not showing in Kibana


(Michael) #1

I'm trying to set types manually for certain fields because Elasticsearch / Kibana is incorrectly categorizing things that should be Numbers as Strings. We are currently doing Filebeat -> Elasticsearch. I know that Logstash can solve some of this, but we'd like to keep our existing flow. I know that mappings can be set in Elasticsearch with a template, so I've tried doing that. But when refreshing the index in Kibana, the field type is still listed as string. How can I fix this?

What I tried to do to set the template:

curl -XPUT 'http://elasticsearch:9200/_template/applog_1' -H 'Content-Type: application/json' -d'
{
	"template": "applog-*",
	"order": 10,
	"mappings": {
		"json.Properties.thingService/timerMs/success": {
			"type": "integer"
		}
	}
}
'

Elasticsearch 2.3.3
Kibana 4.4
Versions upgrades not possible at this time.


(Michael) #2

Nevermind. Seems that the mapping has to be defined higher up the chain, as fields will not automatically convert to the type specified in elasticsearch. So Filebeat needs the template defined.

2017-09-08T19:54:25Z WARN Can not index event (status=400): {"type":"mapper_parsing_exception","reason":"Failed to parse mapping [json.Properties.thingService/timerMs/email/success]: Root mapping definition has unsupported parameters: [type : integer]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [type : integer]"}}


(system) #3

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