grippo 0.2.4

Parse, match and scrub data faster and more efficiently.
Documentation
1
2
3
4
5
6
7
8
9
10
11
# mongod 2.x log: `timestamp [thread] message`. A slow-query line ends in the duration, as in `... nreturned:1 reslen:50 5ms`.
MONGO_LOG %{SYSLOGTIMESTAMP:timestamp} \[%{WORD:component}\] %{GREEDYDATA:message}
MONGO_WORDDASH [A-Za-z0-9_-]+
# The query document, braces included.
MONGO_QUERY \{ .* \}
MONGO_SLOWQUERY %{WORD} %{MONGO_WORDDASH:database}\.%{MONGO_WORDDASH:collection} %{WORD}: %{MONGO_QUERY:query} ntoreturn:%{NONNEGINT:ntoreturn} ntoskip:%{NONNEGINT:ntoskip} nscanned:%{NONNEGINT:nscanned}.* nreturned:%{NONNEGINT:nreturned}.* (?<duration>[0-9]+)ms

# mongod 3.x log: `ISO-timestamp severity component [context] message`, with severity F, E, W, I or D and `-` for an unclassified component.
MONGO3_SEVERITY [FEWID]
MONGO3_COMPONENT (?:%{WORD}|-)
MONGO3_LOG %{TIMESTAMP_ISO8601:timestamp} %{MONGO3_SEVERITY:severity} %{MONGO3_COMPONENT:component}%{SPACE}(?:\[%{DATA:context}\])? %{GREEDYDATA:message}