Arithmetic Operations in logstash

Hi Team,

How to perform arithmetic Operations in logstash
Example: (((field1)+((($field2)-(field1))/2))/300)

Thanks,
Dinesh

There is a math filter that you could install. Otherwise you have to use a ruby filter.

ruby { code => 'event.set("someField", event.get("field1") + event.get("field2"))' }
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.