Unable to convert field from string to integer


#1

I am unable to convert a field, that I am generating using 'kv' plugin, from string to integer. Here is the snippet of the config:

filter {
kv {
allow_duplicate_values => false
value_split => "="
}
mutate { convert => { "elapsed" => "integer" }}
}

Any insight is much appreciated.


(Mike Simos) #2

Hi,

Have you tried using the mutate filter to convert to a string to an integer:

https://www.elastic.co/guide/en/logstash/current/plugins-filters-mutate.html#plugins-filters-mutate-convert


#3

That's exactly what I am trying to use (see the code snippet), however to no success.


(Mark Walkom) #4

Is this an LSF or an LS question?


#5

warkolm, should probably be a LS questions. I'll reopen the request or move it.


#6

Moved to LS section.


(Haroon) #7

Hi

same issue here. How did you fix that ?