Ruby : Remove event

Hello !

I know that it is possible to remove fields from one event thanks to "event.remove('field')".

I want to know if there is a way to remove the complete event and not one or two fields.

My probleme is that I have two events type and I use the aggregate plugin to get some fields from one event and some from the other. I want to push the map as event on timeout and delete the two event that serves me to build the finale event.

I want to know if there is a way to remove the complete event and not one or two fields.

See the example in the ruby filter docs:

filter {
  ruby {
    # Cancel 90% of events
    code => "event.cancel if rand <= 0.90"
  }
}

I works thanks !

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