Skip to content

Instantly share code, notes, and snippets.

@megastef
Last active May 9, 2017 11:29
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 megastef/2c875496f51ed78abfff822e21b3e38c to your computer and use it in GitHub Desktop.
Save megastef/2c875496f51ed78abfff822e21b3e38c to your computer and use it in GitHub Desktop.
a multiline pattern for SDA / logagent
patterns:
- # your app name
blockStart: !!js/regexp ^\d{4}-\d{2}-\d{2}_\d{2}:\d{2}:\d{2}
sourceName: !!js/regexp /YOUR_IMAGE_NAME_HERE/i
match:
- type: YOUR_IMAGE_OR_APP_NAME
regex: !!js/regexp /^(\d{4}-\d{2}-\d{2}_\d{2}:\d{2}:\d{2})\s+(\S+)\s+\[(.+?)\]\s{0,4}\[(.+?)\]\s-\s([\S|\s]+)/
dateFormat: YYYY-MM-DD_HH:mm:ss
fields:
- ts
- severity:string
- thread:string
- class:string
- message:string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment