-
Notifications
You must be signed in to change notification settings - Fork 1
/
09-logstash.txt
38 lines (31 loc) · 953 Bytes
/
09-logstash.txt
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
https://www.elastic.co/products/logstash
/vagrant/config/logstash/suricata.conf
input {
redis {
data_type => "list"
host => "192.168.10.11"
port => 6379
key => "martins-suricata"
tags => ["suricata", "KAV", "fromredis"]
}
}
filter {
json {
source => "message"
}
if 'syslog' not in [tags] {
mutate { remove_field => [ "message", "Hostname" ] }
}
}
output {
elasticsearch {
hosts => ["192.168.10.11"]
index => "suricata-%{+YYYY.MM.dd.hh}"
manage_template => false
document_type => "doc"
}
}
docker run -dit --name logstash -h logstash --network host -v /vagrant/config/logstash/:/usr/share/logstash/pipeline/ -e "ES_JAVA_OPTS=-Xms512m -Xmx512m" --restart unless-stopped --log-driver syslog --log-opt tag="logstash" docker.elastic.co/logstash/logstash-oss:6.6.0
curl localhost:9200/_cat/indices
curl -XGET localhost:9200/suricata-2019.02.17.04/_settings
curl localhost:9200/_cat/indices