Grok is an abstraction on top of regular expressions to allow easy parsing of unstructured text into structured and queryable form.
Parse arbitrary text and structure it.
Grok is a great way to parse unstructured log data into something structured and queryable.
This tool is perfect for syslog logs, apache and other webserver logs, mysql logs, and in general, any log format that is generally written for humans and not computer consumption.
Logstash ships with about 120 patterns by default. You can find them here: https://github.com/logstash-plugins/logstash-patterns-core/tree/master/patterns. You can add your own trivially. (See the patterns_dir setting)
If you need help building patterns to match your logs, you will find at:
- Kibana Grok Debugger
- http://grokdebug.herokuapp.com
- http://grokconstructor.appspot.com/