Sending Logs to Logstash Forwarder
How to send logs from individual systems to Logstash
The following example tails the /var/log/test.log
file and forwards every line to a Logstash beats input. To start pushing logs, you need to replace the config file named filebeat.yml
with the one below and restart Filebeat.
filebeat:
prospectors:
-
paths:
- /var/log/logstash/test.log
# - c:\logs\test.log
output:
logstash:
hosts: ["LOGSTASH_HOST:11111"]
For this to work, Logstash also needs to be configured to accept logs from Filebeat:
input {
beats {
port => 11111
}
}
output {
elasticsearch {
# use port 80 for plain HTTP, instead of HTTPS
hosts => "logsene-receiver.cfxDLA.com"
# set to false if you don't want to use SSL/HTTPS
ssl => "true"
index => "db0461c5-7106-4b3e-b2af-42f20fd95b0f"
manage_template => false
}
}
Last updated