https://github.com/elan-ev/monitoring_blackbox_exporter
Ansible role to install the prometheus blackbox_exporter
https://github.com/elan-ev/monitoring_blackbox_exporter
ansible ansible-role blackbox-exporter monitoring prometheus
Last synced: 10 months ago
JSON representation
Ansible role to install the prometheus blackbox_exporter
- Host: GitHub
- URL: https://github.com/elan-ev/monitoring_blackbox_exporter
- Owner: elan-ev
- License: bsd-3-clause
- Created: 2021-07-14T14:19:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-14T15:56:27.000Z (over 3 years ago)
- Last Synced: 2025-02-25T10:46:43.880Z (11 months ago)
- Topics: ansible, ansible-role, blackbox-exporter, monitoring, prometheus
- Language: Jinja
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role for the blackbox_exporter

Install the latest [blackbox_exporter](https://github.com/prometheus/blackbox_exporter) version with [ansible](https://docs.ansible.com/).
## 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](https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md) 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:
```yaml
- 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](https://molecule.readthedocs.io/en/latest/).
With podman as driver you can install it like this – preferably in a virtual environment (if you use docker, substitute `podman` with `docker`):
```bash
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:
```bash
molecule create
molecule converge
molecule destroy
```
If you want to inspect a running test instance use `molecule login --host `, where you replace `` with the desired value.
## License
[BSD-3-Clause](LICENSE)
## Author Information
[ELAN e.V](https://elan-ev.de/)