how to use clone filter correctly?
Posted: Wed Jun 22, 2016 5:29 am
Hi,
i want to clone a event with logstash's clone filter. But it does not work. I only see the original event.
Here is my filter configuration:
What is wrong here?
The problem is that the event is not cloned.
As first step I wanted to clone the event completely and add a tag to the clone.
Next steps would be to add / remove fileds to / from the clone. But step 1 is not working.
Thanks, Andreas
i want to clone a event with logstash's clone filter. But it does not work. I only see the original event.
Here is my filter configuration:
Code: Select all
if [LogFile] == '1.log'
{
grok
{
match => [ 'message','(?<logTime>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}),\d*\s- activeVehicle=\d+\s+MsgCount\/Hour=\d+\.\d+\s*(?<keyValuePart>.*)']
}
# parse the date to @timestamp
date {
match => ['logTime', 'YYYY-MM-dd HH:mm:ss']
timezone => "Europe/Berlin"
remove_field => ['logTime']
}
# clone the event
clone
{
add_tag => [ "cloned" ]
}
}
The problem is that the event is not cloned.
As first step I wanted to clone the event completely and add a tag to the clone.
Next steps would be to add / remove fileds to / from the clone. But step 1 is not working.
Thanks, Andreas