-
Notifications
You must be signed in to change notification settings - Fork 1
/
dovecot.conf
51 lines (46 loc) · 1.36 KB
/
dovecot.conf
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
input {
pipeline {
address => "dovecot-parsing-entry"
}
}
filter {
grok {
patterns_dir => "/etc/logstash/patterns.d"
match => [ "message", "^%{DOVECOT}$" ]
tag_on_failure => "_grok_dovecot_nomatch"
add_tag => "_grok_dovecot_success"
}
if [dovecot][keyvalue_data] {
kv {
source => "[dovecot][keyvalue_data]"
trim_value => "<>,"
target => "dovecot_kv"
remove_field => "[dovecot][keyvalue_data]"
}
mutate {
# Due to the fact that we can't directly set target to dovecot (it overwrite previous keys)
merge => { "dovecot" => "dovecot_kv" }
remove_field => "dovecot_kv"
}
}
mutate {
convert => [
# list of integer fields
"[dovecot][in]", "integer",
"[dovecot][out]", "integer",
"[dovecot][deleted]", "integer",
"[dovecot][expunged]", "integer",
"[dovecot][trashed]", "integer",
"[dovecot][hdr_count]", "integer",
"[dovecot][hdr_bytes]", "integer",
"[dovecot][body_count]", "integer",
"[dovecot][body_bytes]", "integer",
"[dovecot][mpid]", "integer"
]
}
}
output {
pipeline {
send_to => "dovecot-parsing-exit"
}
}