File: filter-example.grok

package info (click to toggle)
grok 1.20110708.1-4.3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,460 kB
  • sloc: ansic: 3,469; ruby: 987; makefile: 276; sh: 124; yacc: 106
file content (22 lines) | stat: -rw-r--r-- 373 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
program {
  load-patterns: "patterns/base"
  exec "echo '$something \"testing\"'"

  match {
    pattern: ".*"
    reaction: "Shell escaped: %{@LINE|shellescape}"
  }

  match {
    pattern: ".*"
    reaction: "json: { myvalue: \"%{@LINE|jsonencode}\" }"
  }

  match {
    pattern: ".*"
    reaction: "echo %{@LINE|shellescape}"
    shell: "/bin/sh"
    flush: yes
  }

}