GitHub - wouterdb/java-grok: Grok is a great tool for parsing log data

Grok is a tool for parsing data (mostly log data)


Compile

just run maven pakage

find the package in the target folder -> grok-{version}.jar

Dependencies

+gson +common-lang3 +named-regex

Use

Grok g = new Grok();
g.addPatternFromFile(/path/to/pattern);
g.compile("%{URI}");
Match gm = g.match(yourlog);
gm.captures();
//See the result
System.out.println(gm.toJson());

Maven repository

Visit NFLabs Maven repository

Getting help

mail: acorbacho@nflabs.com See also

Info

Grok is a concept of Jordan Sissel