node-grok | Regular expression template library for Node.js | Regex library
kandi X-RAY | node-grok Summary
kandi X-RAY | node-grok Summary
Regular expression template library for Node.js inspired by logstash grok filter module
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Resolve the pattern collection
- Curried function .
- Resolve all subpatterns to one
- Load default directories
- Parses patterns in a file
- Dynamically load default modules from a directory
node-grok Key Features
node-grok Examples and Code Snippets
Community Discussions
Trending Discussions on node-grok
QUESTION
I'm trying to parse some logs in node using grok and it seems to work in the grok debugger but not when I run it in node.
In http://grokdebug.herokuapp.com/ I do:
Input: [2016-02-01 15:29:02,039] INFO [Replica state machine on controller 0]: Invoking state change to OnlineReplica for replicas [Topic=elk-test,Partition=0,Replica=0] (kafka.controller.ReplicaStateMachine)
Pattern: \[%{TIMESTAMP_ISO8601:timestamp}\] %{LOGLEVEL:level} \[%{DATA:message1}\]: %{GREEDYDATA:message2}
which outputs this:
...ANSWER
Answered 2017-Feb-04 at 06:28As is evident from the example, you need to escape the characters [
and ]
correctly. So, in your code, change...
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install node-grok
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page