-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlogstash-lints.conf
52 lines (46 loc) · 1.21 KB
/
logstash-lints.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
52
input {
file {
path => ["/usr/share/logstash/inputs/schemacrawler-lints-*.csv"]
start_position => "beginning"
}
}
filter {
csv {
skip_header => "true"
separator => ","
columns => [
"sclint-dbenv",
"sclint-dbid",
"sclint-catalogName",
"sclint-runid",
"sclint-hitid",
"sclint-linterId",
"sclint-severity",
"sclint-objectName",
"sclint-message",
"sclint-value"
]
}
ruby {
code => 'clazz = nil
if !event.get("sclint-linterId").nil?
clazz = event.get("sclint-linterId").split(".").last
end
event.set("sclint-linterIdClassName", clazz)'
}
ruby {
code => 'pkg = nil
if !event.get("sclint-linterId").nil?
arr = event.get("sclint-linterId").split(".")
pkg = arr.first arr.size - 1
end
event.set("sclint-linterIdPackageName", pkg.join("."))'
}
}
output {
elasticsearch {
hosts => "http://elasticsearch:9200"
index => "schemacrawler-lints"
}
stdout {}
}