No matter what I do, I cannot seem to make filebeat forward logs to logstash as a deb service(/etc/init.d/logstash start). When I run the logstash executable in my terminal pointing to the config file this connection seems to work. There has to be something slightly off with my configuration or understanding of how to run logstash as a detached service.
Environment
2 AWS hosted ubuntu servers, no security group and/nacls blocking the connection
Filebeats installed on my application servers
- filebeat.yml passes configtest
- filebeat stays running as a service
Logstash installed as deb on a master server
- logstash.conf passes config test and is saved in /etc/logstash/conf.d
- Elasticsearch is commented out in logstash.conf
- logstash is running as a service
- logstash.conf Permissions-> -rw-rw-rw- logstash logstash logconsolidated.log
- No cert/ssl/tls keys/encryption are being used at this time
Filebeat config
filebeat:
# List of prospectors to fetch data.
prospectors:
paths:
- /opt/somedirectoy/test/log/mylog.log
input_type: log
### Logstash as output
logstash:
# The Logstash hosts
hosts: ["10.10.10.10:5044"]
Logstash.conf
input {
beats {
port => 5044
}
}
output {
file {
path => "/opt/logstash/output/log-consolidated.log"
}
}