Hi all
I'm trying to correlate multiple log file into 1 log message send to elastic using aggregate plugin in logstash.
2022-02-18T09:51:25.528Z,mail-srv\Client mail-srv,08D9DD5FF4988FD5,37,192.168.1.1:587,192.168.2.2:60095,*,,User Name: NULL
2022-02-18T09:51:25.528Z,mail-srv\Client mail-srv,08D9DD5FF4988FD5,19,192.168.1.1:587,192.168.2.2:60095,>,235 2.7.0 Authentication successful,
Now i want to from same id 08D9DD5FF4988FD5
i can get this two log messge into 1 log message like this
2022-02-18T09:51:25.528Z,mail-srv\Client mail-srv,08D9DD5FF4988FD5,37,192.168.1.1:587,192.168.2.2:60095,User Name: NULL,235 2.7.0 Authentication successful,
Or somethings like that.
I have tried this config
filter {
aggregate {
task_id => "%{id}"
code => "
map['mail_data'] ||= event.get('mail.data')
map['mail_context'] ||= event.get('mail.context')
"
push_map_as_event_on_timeout => true
timeout_task_id_field => "id"
timeout => 30
timeout_tags => ['_aggregatetimeout']
}
}
the mail.data
field is User Name: NULL
and the mail.context
is 235 2.7.0 Authentication successful
Thanks for your time.