Applying ruby code to several fields in an event?

Hi,

What would be the best way to applyc same ruby code to several fields? To grok something, then do (the same) math on the fields from the grok. Or to convert date/time to/from epoch. It is possible just to repeat the same code over and over (if [myfield] {ruby ...}) for each of the fields. But is that the best way?

In the Ruby code just loop over the fields you want to process or, if you don't know which fields you might have, iterate over all fields.

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