Mutate -> convert filter is not working as expected

I am trying to creating a new field using mutate-> add_field filter for a key coming from json data. I need to convert that filed to a integer/number. i am using the below syntax

mutate
{
convert => {"timeTaken" => "integer"}
}

Possible values in this field are - numeric Ex: 60,37,90,100,23,0.

I am not getting any error while running the logstash script, but when i am trying to see that field in kibana the type it is showing as unknown(?).

I need this field to be numeric to implement some bar charts.

ELK version i am using is 6.3

Appreciate your help.

Please check the sample value in the filed "timeTaken"

Can you copy the sample log here ?

I can't share the entire log as it has some sensitive data. but the value is coming in the log as
"timeTaken":"60" inside the json.

i am able to see the data in the kibana. Attached the screen.
Capture

Hi @rijinmp - Let me know if the info i sent is good to validate at your end.

Refresh your index . May be this filed is not comes in index . This is a new one.

Management -> Index -> your index -> Refresh

I am deleting the index and re-creating it every time for testing, but no change.

I have tried your option(index refresh) though, but no change. Issue remains same.

I have restarted all the Logstash, elsaticsearch and kibana. It started working, i mean the field is showing as number in kibana.

1 Like

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