Skip to content

Commit

Permalink
conf: parser: improve mongodb parser (#390)
Browse files Browse the repository at this point in the history
- Fix field naming (context<->component)
- Add an optional "ms" field that will be the Microseconds the query took to execute (won't be there is it's not a COMMAND)
  • Loading branch information
hetile-ssense authored and edsiper committed Oct 2, 2017
1 parent b461a0c commit 1333e61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conf/parsers.conf
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
[PARSER]
Name mongodb
Format regex
Regex ^(?<time>[^ ]*)\s+(?<severity>\w)\s+(?<context>[^ ]+)\s+\[(?<connection>[^\]]+)]\s+(?<message>.*)$
Regex ^(?<time>[^ ]*)\s+(?<severity>\w)\s+(?<component>[^ ]+)\s+\[(?<context>[^\]]+)]\s+(?<message>.*?) *(?<ms>(\d+))?(:?ms)?$
Time_Format %Y-%m-%dT%H:%M:%S.%L
Time_Keep On
Time_Key time

0 comments on commit 1333e61

Please sign in to comment.