forked from druids/django-security
-
Notifications
You must be signed in to change notification settings - Fork 1
/
logstash.example.conf
42 lines (40 loc) · 1.02 KB
/
logstash.example.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
input {
tcp {
port => 5044
ecs_compatibility => "v1"
codec => json_lines {
ecs_compatibility => "v1"
}
}
}
filter {
grok {
ecs_compatibility => "v1"
match => { "message" => "(?<[@metadata][index]>security-(input-request|output-request|command|celery-task-run|celery-task-invocation)-log) %{NOTSPACE:[@metadata][version]} %{NOTSPACE:[@metadata][id]} %{GREEDYDATA:request_data}" }
}
}
filter {
json{
ecs_compatibility => "v1"
source => "request_data"
remove_field => "request_data"
}
mutate {
remove_field => ["@version", "@timestamp", "message", "event", "log_name", "original", "hostname", "tags", "level", "logger_name", "type", "stack_info"]
}
}
filter {
mutate {
rename => { "meta" => "[extra_data][meta]" }
}
}
output {
elasticsearch {
ecs_compatibility => "v1"
hosts => "elasticsearch:9200"
index => "%{[@metadata][index]}-%{+YYYY-MM-dd}"
document_id => "%{[@metadata][id]}"
version => "%{[@metadata][version]}"
version_type => "external"
}
}