I've got Data from a Json Object and what i want is to calculate some Values of the same Object
e.g.
filter {
json {
source => "message"
}
mutate {
add_field => {
"xxx1" => "Float(%{[BME680][Temperature]}*1.634*%{[BME680][Pressure]})"
"xxx2" => "Float(%{[BME680][Temperature1]}*1.634*%{[BME680][Pressure1]})"
"xxx3" => "Float(%{[xxx1]}-%{[xxx2]})"
}
}
}
The calculation is hier just for demo purposes - it's just multipling some fields and devide them.
The action should be that:
xxx1 should be calculated from some fields
xxx2 should be calculated from some fields
xxx3 should be calculated from both fields
ist this possible in logstash and how can it be done?
i only get the following
Aug 9, 2022 @ 14:13:39.104 Float(31.91.63410*993.0)
so i get the value as a String not as a number!