因此,我一直忙于计算某些事件之间的时差,并遇到了一个实例,其中两个任务因同一事件而停止,但是,当两次调用已用插件时,只会记录第一个。我应该怎么做才能完成记录?
示例配置:
filter {
grok {
match => ["message", "STARTING TASK1: (?.)"]
add_tag => [ "Task1Started" ]
}
grok {
match => ["message", "STARTING TASK2: (?.)"]
add_tag => [ "Task2Started" ]
}
grok {
match => ["message", "ENDING ALL TASKS: (?.)"]
add_tag => [ "Task1Terminated", "Task2Terminated"]
}
elapsed {
start_tag => "Task1Started"
end_tag => "Task1Terminated"
unique_id_field => "task_id"
}
elapsed {
start_tag => "Task2Started"
end_tag => "Task2Terminated"
unique_id_field => "task_id"
}
}
感谢您对此问题的任何帮助! 我也提出这个问题:https://github.com/logstash-plugins/logstash-filter-elapsed/issues/13