mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 20:03:04 +00:00
f637d5f7c9
Signed-off-by: Stan Rudenko <stan@truera.com>
36 lines
1.3 KiB
Django/Jinja
36 lines
1.3 KiB
Django/Jinja
#jinja2: trim_blocks: True, lstrip_blocks: True
|
|
{{ ansible_managed | comment }}
|
|
# http://prometheus.io/docs/operating/configuration/
|
|
|
|
global:
|
|
{{ prometheus_global | to_nice_yaml(indent=2,sort_keys=False) | indent(2, False) }}
|
|
external_labels:
|
|
{{ prometheus_external_labels | to_nice_yaml(indent=2,sort_keys=False) | indent(4, False) }}
|
|
|
|
{% if prometheus_remote_write != [] %}
|
|
remote_write:
|
|
{{ prometheus_remote_write | to_nice_yaml(indent=2,sort_keys=False) | indent(2, False) }}
|
|
{% endif %}
|
|
|
|
{% if prometheus_remote_read != [] %}
|
|
remote_read:
|
|
{{ prometheus_remote_read | to_nice_yaml(indent=2,sort_keys=False) | indent(2, False) }}
|
|
{% endif %}
|
|
|
|
{% if not prometheus_agent_mode and prometheus_alert_rules_files != [] %}
|
|
rule_files:
|
|
- {{ prometheus_config_dir }}/rules/*.rules
|
|
{% endif %}
|
|
|
|
{% if prometheus_alertmanager_config | length > 0 %}
|
|
alerting:
|
|
alertmanagers:
|
|
{{ prometheus_alertmanager_config | to_nice_yaml(indent=2,sort_keys=False) | indent(2,False) }}
|
|
{% if prometheus_alert_relabel_configs | length > 0 %}
|
|
alert_relabel_configs:
|
|
{{ prometheus_alert_relabel_configs | to_nice_yaml(indent=2,sort_keys=False) | indent(2,False) }}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
scrape_configs:
|
|
{{ prometheus_scrape_configs | to_nice_yaml(indent=2,sort_keys=False) | indent(2,False) }}
|