所以我一直忙于计时某些事件之间的时间差,并且遇到了一个实例,其中两个任务因同一个事件而停止,但是,当两次调用 elapsed 插件时,只记录第一个。我应该怎么做才能同时制作经过的记录?
示例配置:
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