Skip to content

idealista/filebeat_role

Repository files navigation

Logo

Build Status

Filebeat Ansible role

Getting Started

Ansible role for 7.x/8.x Filebeat. Currently, this works on Debian based linux systems. Tested platforms are:

  • Debian 10
  • Debian 11

These instructions will get you a copy of the role for your ansible playbook. Once launched, it will install Filebeat.

Prerequisites

To execute this role:

Minimum Ansible version of 2.10.0 and recommended Ansible 5.8.0 version installed.

For testing purposes:

Installing

Create or add to your roles dependency file (e.g. requirements.yml):

- src: idealista.filebeat_role
  version: 1.0.0
  name: filebeat

Install the role with ansible-galaxy command:

ansible-galaxy install -p roles -r requirements.yml -f

Use in a playbook:

- hosts: someserver
  roles:
    - role: filebeat

Usage

Look to the defaults properties file to see the possible configuration properties.

You must configure default template and apply basic configuration, for example:

filebeat:
  modules:
  inputs:
  - type: log
    enabled: true
    paths:
      - /var/log/*.log
    encoding: utf8

output:
  elasticsearch:
    hosts: ["elasticsearch-host:9200"]

logging:
  level: info

Also, you can see an example on molecule test.

Testing

pipenv install -r test-requirements.txt
pipenv run molecule test

Built With

Ansible

Versioning

For the versions available, see the tags on this repository.

Additionally, you can see what change in each version in the CHANGELOG.md file.

Authors

See also the list of contributors who participated in this project.

License

Apache 2.0 License

This project is licensed under the Apache 2.0 license - see the LICENSE file for details.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.