-
Notifications
You must be signed in to change notification settings - Fork 28
/
scenario4.conf
46 lines (44 loc) · 1002 Bytes
/
scenario4.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
input {
file {
path => "/home/qtkha/ElasticStackZone/April21/logstashconfigurations/movies.csv"
start_position => "beginning"
sincedb_path => "/dev/null"
}
}
filter {
csv {
separator => ","
columns => ["id", "movietitle", "genres"]
}
mutate {
split => { "genres" => "|" }
}
mutate {
split => {"movietitle" => "("}
add_field => {"title" => "%{[movietitle][0]}"}
strip => ["title"]
add_field => {"year" => "%{[movietitle][1]}"}
}
mutate{
gsub => [
"year", "\)", " "
]
strip => ["year"]
remove_field => ["path", "message", "@timestamp","host", "movietitle"]
}
mutate {
convert => {
"year" => "integer"
}
}
}
output{
elasticsearch {
hosts => "http://10.128.15.198:9200"
index => "mymovies"
document_id => "%{id}"
}
stdout {
codec => rubydebug
}
}