Ansible role for installing and configuring elastic beats clients. Primarily used for shipping logs and metrics to an ELK stack. By default, this role will ship to logstash on the same box using filebeat and metricbeat.
- someplace to ship data to - as of the beats 5.x series this includes shipping to
file
,kafka
,redis
,console
,elasticsearch
, and/orlogstash
You'll need an SSL cert to encrypt logs in transit to the logstash/elasticsearch. This logic is not provided by this role and encryption is not enabled by default. You'll need to reference the official beats documentation output guides to add those options via variables.
- name: Configure beats clients.
hosts: clients
roles:
- role: freedomofpress.beats
tags: clients
This role uses Molecule and Testinfra for testing. To use it:
pip install -r requirements.txt
molecule test
You can also run selective commands:
molecule idempotence
molecule verify
To fire up an elasticsearch UI for debugging, run:
make elastic-ui
See the Molecule docs for more info.
The following resources were invaluable in creating this role.
MIT