elan.monitoring_blackbox_exporter

Ansible Role for the blackbox_exporter

molecule

Install the latest blackbox_exporter version with ansible.

Role Variables

Currently, there are no variable to be set, except which configuration template you want to use. The role comes with a simple configuration, that you will likely want to extend (see the blackbox_exporter config options for that). To pass your own configuration file, change the path to the template in the variable blackbox_exporter_config_template.

Keep in mind that you also need to configure your prometheus targets in order to scrape the results of the blackbox_exporter.

Example Playbook

Just add the role to your playbook:

- hosts: all
  become: true
  roles:
    - role: elan.monitoring_blackbox_exporter
      blackbox_exporter_config_template: 'custom_templates/blackbox.yml.j2'

Development

For development and testing you can use molecule. With podman as driver you can install it like this – preferably in a virtual environment (if you use docker, substitute podman with docker):

pip install -r .dev_requirements.txt

Then you can create the test instances, apply the ansible config (converge) and destroy the test instances with these commands:

molecule create
molecule converge
molecule destroy

If you want to inspect a running test instance use molecule login --host <instance_name>, where you replace <instance_name> with the desired value.

License

BSD-3-Clause

Author Information

ELAN e.V

About

install the blackbox_exporter

Install
ansible-galaxy install elan.monitoring_blackbox_exporter
GitHub repository
License
bsd-3-clause
Downloads
4.7k
Owner
elan e.V. is a German non-profit organization helping universities and other higher education organizations with all things related to e-learning