-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Reconfigure logstash.conf
Marco Ochse edited this page May 11, 2022
·
5 revisions
docker exec -it logstash bash
cd /etc/logstash/
cp logstash.conf /data/elk/logstash.conf
exit
systemctl stop tpot
vi /data/elk/logstash.conf
[...]
# Output section
output {
elasticsearch {
hosts => ["elasticsearch:9200"]
# document_type => "doc"
}
if [type] == "Suricata" {
file {
file_mode => 0760
path => "/data/suricata/log/suricata_ews.log"
}
}
# Debug output
#if [type] == "XYZ" {
# stdout {
# codec => rubydebug
# }
#}
# Debug output
#stdout {
# codec => rubydebug
#}
}
[...]
chmod 760 /data/elk/logstash.conf
chown tpot:tpot /data/elk/logstash.conf
vi /opt/tpot/etc/tpot.yml
[...]
## Logstash service
logstash:
container_name: logstash
restart: always
depends_on:
elasticsearch:
condition: service_healthy
env_file:
- /opt/tpot/etc/compose/elk_environment
image: "dtagdevsec/logstash:1903"
volumes:
- /data:/data
- /data/elk/logstash.conf:/etc/logstash/logstash.conf
[...]
systemctl start tpot