I need to extract and convert a nom-numeric value to long.
Message is:
Verificant si hi ha 814.078 bytes disponibles a la CAU del FO
I need to extract 814.078
and convert it to long or any numeric format. Up to now:
rule "uploaded size"
when
starts_with(to_string($message.message), "Verificant si hi ha", true)
then
let extract = grok("%{BASE10NUM:uploaded_size;long}", to_string($message.message), false);
set_fields(extract);
end
But I’m getting:
uploaded_size
814.078
uploaded_size_grokfailure
java.lang.NumberFormatException: For input string: "814.078"
Any ideas? It has to be an non-float numeric value (int, long…)