Skip to content

Instantly share code, notes, and snippets.

@canhnt
Created April 23, 2021 14:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save canhnt/e8c1c58b3250e2ccc2edb5ceb0877d9b to your computer and use it in GitHub Desktop.
Save canhnt/e8c1c58b3250e2ccc2edb5ceb0877d9b to your computer and use it in GitHub Desktop.
Grok-pattern

Grok pattern for glog

E%{MONTHNUM:month}%{MONTHDAY:day} %{TIME}\s*%{NUMBER:threadid} (?<file_source>%{WORD}\.%{WORD}):(?<file_line>%{NUMBER})\] (?<message>.*)

Example:

E0423 11:41:45.456532       1 reconcile.go:30] Upsert role 'xxx' failed: Failed to upsert ES role, expect StatusCode=200, but has 400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment