Timur,

No doubts, LPEG is awesome! So awesome that Lunatic's grok
implementation in grok is all based around it:

https://github.com/arekinath/loglunatic/blob/master/lunatic/filters/common.lua


However the real advantage of grok is its user base and is reasonably
broad support by tools (.e.g. LogStash, FluentD, Graylog2, and
others)...

This mean you gain an easy source of pre-defined parsing rules without
having to rewrite them as a sandbox LPEG, e.g:

https://github.com/whyscream/postfix-grok-patterns
https://github.com/elastic/logstash/tree/v1.4.2/patterns
http://www.gregmefford.com/blog/2014/09/24/analyzing-cisco-asa-firewall-logs-with-logstash/
http://seclists.org/snort/2013/q4/174


Another plus is that allows heka users to maintain a single patter
base and process logs in a similar way across multiple platforms. I
have been doing that with a legacy app using a PHP implemention of
grok and it is so handy... You just copy the pattern folders from
logstash to phpgrok and voila!

Cheers

On Thu, Sep 24, 2015 at 9:58 PM, Timur Batyrshin <[email protected]> wrote:
> Hi Andre,
>
> Have you checked LPEG? It is really cool too.
> Here is a tutorial for it: http://lua-users.org/wiki/LpegTutorial
> Some real usage example in Heka can be used at
> https://github.com/mozilla-services/heka/tree/dev/sandbox/lua/decoders
> (for example
> https://github.com/mozilla-services/heka/blob/dev/sandbox/lua/decoders/linux_loadavg.lua#L48-L58
> which is failrly easy to
> understand even without reading docs on LPEG).
> There is also an online LPEG testing tool as well with a few examples to
> play with it easily: http://lpeg.trink.com/
>
> Regards
> Timur
>
> On 24 Sep 2015 at 13:38:54, Andre ([email protected]) wrote:
>
> Hi there,
>
> Grok is perhaps one of the coolest features of logstash (once you get
> used to debug it...)
>
> Do you think heka should have similar capability?
>
> If yes, what would you reckon, Go or Lua?*
>
>
> Cheers
>
>
> * - I could find pre existing implementations of Grok in both languages
> _______________________________________________
> Heka mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/heka
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to