Logstash how to set field index type from json input

I want save data to elasticsearch by a json input, but when I created it I found that all my field type is string...

I try to format my data and it can achieve number and string two types' indices like this:
image

But c is an IP type here it is classified as string too... And I try to use mutate but find mutate can only support integer, float, string, and boolean convertion.

So is there a way to customize field type? Thanks

It's Elasticsearch that controls the mappings of the index, although actions taken in Logstash can affect the choices ES makes. Have a look at mappings and index templates in the ES documentation.

Well, you're right. Now I use index-template in elasticsearch to solve this, thank you

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