2021-05-29 11:45:35 +00:00
|
|
|
#jinja2: lstrip_blocks: True
|
|
|
|
{{ ansible_managed | comment }}
|
|
|
|
|
|
|
|
global:
|
|
|
|
{{ prometheus_global | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
|
|
external_labels:
|
|
|
|
{{ prometheus_external_labels | to_nice_yaml(indent=2) | indent(4, False) }}
|
2021-05-29 15:52:24 +00:00
|
|
|
{% if prometheus_remote_write | length > 0 %}
|
2021-05-29 11:45:35 +00:00
|
|
|
|
|
|
|
remote_write:
|
|
|
|
{{ prometheus_remote_write | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
|
|
{% endif %}
|
2021-05-29 15:52:24 +00:00
|
|
|
{% if prometheus_remote_read | length > 0 %}
|
2021-05-29 11:45:35 +00:00
|
|
|
|
|
|
|
remote_read:
|
|
|
|
{{ prometheus_remote_read | to_nice_yaml(indent=2) | indent(2, False) }}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
rule_files:
|
|
|
|
- {{ prometheus_rules_dir }}/*.rules
|
|
|
|
{% if prometheus_alertmanager_config | length > 0 %}
|
|
|
|
|
|
|
|
alerting:
|
|
|
|
alertmanagers:
|
2021-05-30 12:26:05 +00:00
|
|
|
{{ prometheus_alertmanager_config | to_nice_yaml(indent=2) | indent(2, False) }}
|
2021-05-29 11:45:35 +00:00
|
|
|
{% if prometheus_alert_relabel_configs | length > 0 %}
|
|
|
|
alert_relabel_configs:
|
2021-05-30 12:26:05 +00:00
|
|
|
{{ prometheus_alert_relabel_configs | to_nice_yaml(indent=2) | indent(2, False) }}
|
2021-05-29 11:45:35 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
scrape_configs:
|
2021-05-30 12:26:05 +00:00
|
|
|
{{ prometheus_scrape_configs | to_nice_yaml(indent=2) | indent(2, False) }}
|