1
0
Fork 0
mirror of https://gitlab.com/s3lph/ansible-collection-prometheus synced 2024-12-23 00:37:33 +01:00

Re-add host-specific alerts

This commit is contained in:
s3lph 2021-11-06 06:17:14 +01:00
parent 77bab78acc
commit d16f1cb060

View file

@ -11,7 +11,13 @@ groups:
{% if job.group | default(prometheus_default_alert_group_name) == group %}
{{ job.alerts | to_nice_yaml(indent=2) | indent(2, first=true) }}
{% endif %}
{% endfor %}
{% for host in hostvars.keys() %}
{% if 'prometheus_host_specific_alerts' in hostvars[host] and host.prometheus_host_specific_alert_group | default(prometheus_default_alert_group_name) == group %}
{{ hostvars[host].prometheus_host_specific_alerts | to_nice_yaml(indent=2) | indent(2, first=true) }}
{% endif %}
{% endfor %}