This post is older than a year. Consider some information might not be accurate anymore.
In logstash some grokked fields in messages, that suppose to be numeric, flying in with “NaN” (Not a Number). You can convert them with the mutate filter plugin.
if [value] == "NaN" {
mutate {
replace => { "value" => 0 }
}
}