This Ansible role create target file for Prometheus custom service discovery and add to this file all hosts from Ansible inventory.
Note: you need to (re)define prometheus_custom_targets_path
variable
before run thois role and configure your Prometheus server to use this cusdtom
path (according to article).
Original repo: https://github.com/anmcarrow/anmcarrow.ansible.prometheus-targets-from-inventory-setup
See meta/main.yml
See meta/main.yml
- hosts: all
roles:
- generic.prometheus-targets-from-inventory-setup
MIT
Andrey Makarov [email protected]