Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [logger] == "TASK_START" {
- aggregate {
- task_id => "%{taskid}"
- code => "map['sql_duration'] = 0"
- map_action => "create"
- }
- }
- if [logger] == "SQL" {
- aggregate {
- task_id => "%{taskid}"
- code => "map['sql_duration'] += event['duration']"
- map_action => "update"
- }
- }
- if [logger] == "TASK_END" {
- aggregate {
- task_id => "%{taskid}"
- code => "event['sql_duration'] = map['sql_duration']"
- map_action => "update"
- end_of_task => true
- timeout => 120
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement