I created the following pipeline-rule to convert Bytes from a syslog to Megabytes.
rule "Bytes to Megabytes" when has_field("Bytes") then let mbyte = to_long($message.Bytes); set_field("MBytes", mbyte / 1048576); end
Messages are processed by the pipeline and the new field “MBytes“ is inserted.
But when the Bytes value is smaller than 1048576 I always get 0 as result.
Is “long” the wrong data type?