Skip to content

Latest commit

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

node-grok

What is it ?

It's a NodeJS implementation of ruby-grok.

Requires libgrok to be installed.

Usage

Installing libgrok

Mac OS: brew install grok

Debian unstable: apt-get install libgrok1 libgrok-dev

Please refer to the Grok Homepage for further instructions

Basic Usage

vargrok=require('node-grok');// or require('./lib/grok.js')matcher=grok.create()matcher.addPatternsFromFile('./patterns/base')matcher.compile("%{IP:ip_address} %{WORD:text}")res=matcher.match("does not match")// falseres=matcher.match("127.0.0.1 home")res.captures(){ip_address: ['127.0.0.1'],text: ['home']}

About

a node.js reimplementation of ruby-grok

Resources

Stars

10 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages