File: errorlogcheck.grok

package info (click to toggle)
grok 1.20110708.1-4.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,408 kB
  • ctags: 1,006
  • sloc: ansic: 3,469; ruby: 987; makefile: 276; sh: 124; yacc: 106
file content (16 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
program {
  exec "since /var/log/messages"

  # Ignore certain messages
  match {
    pattern: "this is not an error"

    # Silence the output and ensure no further matches are attempted.
    reaction: none        # no output
    break-if-match: yes   # don't continue to the next match
  }

  match {
    pattern: "error"
  }
}