I want to create new events from the existing one. I'd rather not create, compile and install a new filter if possible rather I'd like to use a ruby filter, e.g.
filter{
ruby{
code => '
host_list = event["hostList"]
# create new event for each host
host_list.each do |host|
new_event = event.clone
# add/remove stuff from new_event
yield new_event #FAILS! yield called out of block
end
'
}
}
I understand why the yield fails but I don't know how to make the new event show up in rubydebug codec. Any help appreciated.
Craig