jobscore.beats
Role Name
=========
This role installs Beats products on an Ubuntu machine.
This role can install Beats products that come as deb packages. Currently, it supports configuration only for these products:
- filebeat
- metricbeat
Requirements
None
Role Variables
To install Beats products, specify the version using the beats_version
variable (default: 6.7.2).
beats_version: 6.7.2
You also need to list the products you want to install in the beats_products
variable (default: []).
beats_products:
- filebeat
- metricbeat
If you want to prevent Beats packages from updating automatically (default: true), use the beats_hold_products
variable:
beats_hold_products: true
To configure the products right away, you must create a variable named after the product plus _config:
. This should contain the YAML configuration for your chosen product. For example:
filebeat_config:
filebeat.modules:
- module: system
syslog:
enabled: true
output.logstash.hosts:
- logstash.server:5044
metricbeat_config:
metricbeat.modules:
- module: system
metricsets: ["cpu","memory","network"]
enabled: true
period: 15s
processes: ['.*']
output.logstash.hosts:
- logstash.server:5044
You can find specific configuration details in the Beats documentation.
Dependencies
There are no dependencies.
Example Playbook
Here’s an example of how to use this role, including variable settings:
- hosts: servers
become: true
roles:
- role: jobscore.beats
beats_version: 6.7.2
beats_products:
- filebeat
- metricbeat
filebeat_config:
filebeat.modules:
- module: system
syslog:
enabled: true
output.logstash.hosts:
- logstash.server:5044
metricbeat_config:
metricbeat.modules:
- module: system
metricsets: ["cpu","memory","network"]
enabled: true
period: 15s
processes: ['.*']
output.logstash.hosts:
- logstash.server:5044
License
GPLv3
Author Information
This role was created by Eric Magalhães
Ansible role for isntalling Beats on Ubuntu
ansible-galaxy install jobscore.beats