Ansible role to install/configure Logstash
Default config if config_logstash=true
is to open tcp/udp 10514
because
ports < 1024 require root access. Configure clients to send to udp/tcp 10514
.
You can configure rsyslog to listen on tcp/udp 514
and redirect rsyslog
to send to localhost on tcp/udp 10514
to accomodate clients which cannot
send to a different port. See example below:
/etc/rsyslog.d/50-default.conf
tcp
:
*.* @@localhost:10514
udp
:
*.* @localhost:10514
For any required Ansible roles, review: requirements.yml
defaults/main.yml Use your own outputs:
Example:
logstash_custom_outputs:
- output: "gelf"
lines:
- 'host => "localhost"'
- 'port => "12201"'
Additional variables for customized configs:
logstash_custom_inputs:
- input: someinput
lines:
- 'somekey => "value"'
logstash_custom_filters:
- lines:
- 'somekey => "value"'
logstash_custom_outputs:
- output: someoutput
lines:
- 'somekey => "value"'
MIT
Larry Smith Jr.
NOTE: Repo has been created/updated using https://github.com/mrlesmithjr/cookiecutter-ansible-role as a template.