forked from CodeChain-io/codechain
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlogstash.conf
More file actions
35 lines (33 loc) · 739 Bytes
/
logstash.conf
File metadata and controls
35 lines (33 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
input {
file {
id => "0"
path => "/var/tmp/codechain/codechain.log.*"
start_position => beginning
}
}
filter {
grok {
match => {
"message" => "#%{INSTANCE:instance}\s+%{TIMESTAMP:timestamp}\s+%{THREAD:thread}\s+%{LEVEL:level}\s+%{TARGET:target}\s+%{MESSAGE:message}"
}
overwrite => [ "message" ]
# remove_field => [ "@timestamp" ]
pattern_definitions => {
"INSTANCE" => "\d+"
"TIMESTAMP" => "\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}"
"THREAD" => ".+"
"LEVEL" => "OFF|ERROR|WARN|INFO|DEBUG|TRACE"
"TARGET" => "[\w.]+"
"MESSAGE" => ".*$"
}
}
date {
match => [ "timestamp", "yyyy-MM-dd HH:mm:ss" ]
remove_field => [ "timestamp" ]
}
}
output {
elasticsearch {
hosts => [ "localhost:9200" ]
}
}