metricbeat

nephelaiio.metricbeat

Build Status Ansible Galaxy

An ansible role to install and configure metricbeat

Role Variables

Please refer to the defaults file for an up to date list of input parameters.

Dependencies

Please review the dependency configuration for more details

Example Playbook

There are three main ways to configure metricbeat with this module:

No configuraton management (useful for upgrades)

- hosts: servers
  vars:
    metricbeat_package_state: latest
    metricbeat_conf_manage: no
  roles:
     - role: nephelaiio.metricbeat

Defaut configuration, active modules are auto detected from installed packages

- hosts: servers
  vars:
    metricbeat_conf_docker_hosts
      - unix:///var/run/docker.sock
    metricbeat_conf_postgresql_hosts:
      - postgres://localhost:5432
    metricbeat_conf_postgresql_user: root
    metricbeat_conf_postgresql_pass: pass
    metricbeat_conf_nginx_hosts:
      - http://127.0.0.1
    metricbeat_conf_nginx_status_path: nginx_status
  roles:
     - role: nephelaiio.metricbeat

Custom configuration, configuration deployed verbatim

- hosts: servers
  vars:
    metricbeat_conf: "{{ lookup('template', 'template.j2.yml') | from_yaml }}"
  roles:
     - role: nephelaiio.metricbeat

Testing

Please make sure your environment has docker installed in order to run role validation tests. Additional python dependencies are listed in the requirements file

Role is tested against the following distributions (docker images):

  • Ubuntu Jammy
  • Ubuntu Focal
  • Debian Bookworm
  • Debian Bullseye
  • Rocky Linux 9

You can test the role directly from sources using command make test

License

This project is licensed under the terms of the MIT License

About

An Ansible role to install and configure metricbeat

Install
ansible-galaxy install nephelaiio/ansible-role-metricbeat
GitHub repository
License
mit
Downloads
25813