-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlogstash-sources.conf
50 lines (48 loc) · 1.13 KB
/
logstash-sources.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
input {
file {
discover_interval => 1
path => [ "/espace/espace.csv" ]
sincedb_path => "/opt/logstash/espace/.sincedb"
start_position => "beginning"
type => "espace"
}
file {
discover_interval => 1
path => [ "/sinet/sinet.csv" ]
sincedb_path => "/opt/logstash/sinet/.sincedb"
start_position => "beginning"
type => "sinet"
}
}
filter {
if [type] == "espace" {
csv {
type => "espace"
columns => ["aut_org_username", "aut_org_desc", "aut_pos_title", "aut_aou", "aut_class_lev1"]
}
} else if [type] == "sinet" {
csv {
type => "sinet"
columns => ["s_username","s_subject","s_catalog_nbr", "s_subject_full", "s_descr", "s_acad_group", "s_acad_org", "s_acad_org_desc", "s_acad_group_desc"]
}
}
}
output {
if [type] == "espace" {
elasticsearch {
embedded => false
host => "elasticsearch"
port => 9200
protocol => "http"
index_type => "espace"
}
} else if [type] == "sinet" {
elasticsearch {
embedded => false
host => "elasticsearch"
port => 9200
protocol => "http"
index_type => "sinet"
}
}
}