File tree Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Expand file tree Collapse file tree 2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 1
1
input {
2
+
3
+ # This works
2
4
generator {
3
- message => "google.com"
5
+ message => "www. google.com"
4
6
count => 1
7
+ type => "test1"
5
8
}
6
9
10
+ # This will fail
7
11
generator {
8
- message => "google.co.uk "
12
+ message => "google.co.ukf "
9
13
count => 1
14
+ type => "test1"
10
15
}
16
+
17
+ # Shows using the source option
18
+ generator {
19
+ message => "The domain is www.google.com"
20
+ count => 1
21
+ type => "test2"
22
+ }
23
+
11
24
}
12
25
13
26
filter {
14
- tld {}
27
+ if [type] == "test1" {
28
+ tld {}
29
+ }
30
+ if [type] == "test2" {
31
+ grok {
32
+ match => [ "message", "The domain is %{HOST:domain}" ]
33
+ }
34
+ tld {
35
+ source => "domain"
36
+ }
37
+ }
15
38
}
16
39
17
40
output {
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def register
35
35
public
36
36
def filter ( event )
37
37
38
- if @field and PublicSuffix . valid? ( event [ @source ] )
38
+ if @source and PublicSuffix . valid? ( event [ @source ] )
39
39
domain = PublicSuffix . parse ( event [ @source ] )
40
40
# Replace the event message with our message as configured in the
41
41
# config file.
You can’t perform that action at this time.
0 commit comments