/etc/logstash/logstash-sample.conf bevat een voorbeeldje: # Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Elasticsearch pipeline.
input {
beats {
port => 5044
}
}
output {
elasticsearch {
hosts => ["http://localhost:9200"]
index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
#user => "elastic"
#password => "changeme"
}
}
/etc/filebeat/filebeat.yml en voeg volgende key toe aan een filebeat.input: output.logstash: hosts: ["localhost:5044"]
voorbeeld:
filebeat.inputs:
- type: log
paths:
- /var/log/voorbeeld.log
output.logstash:
hosts: ["localhost:5044"]
/var/log/voorbeeld.log wordt linea recta naar logstash gestuurd.
/etc/filebeat/filebeat/ymllogging.level: debugsudo systemctl restart filebeat
tail -f /var/log/filebeat/filebeat
echo "Ha! Het zal wel werken >> /var/log/voorbeeld.log"
voeg hier linken toe naar verdere uitleg