prometheus: cleanup

This commit is contained in:
Markus 2020-05-25 15:52:28 +02:00
parent d710bd841b
commit 1af46b5e28
3 changed files with 12 additions and 6 deletions

View File

@ -44,12 +44,12 @@ ntp_servers:
- 2.de.pool.ntp.org
- 3.de.pool.ntp.org
prometheus_pve_user: prometheus@pve
prometheus_pve_pass: "{{ vault_prometheus_pve_pass }}"
pve_targets:
- pve01.ffrgb
- pve02.ffrgb
prometheus_pve_user: prometheus@pve
prometheus_pve_pass: "{{ vault_prometheus_pve_pass }}"
site: ffrgb
site_domain: regensburg.freifunk.net

View File

@ -1,10 +1,10 @@
---
- name: Reload systemd
command: systemctl daemon-reload
- name: Restart prometheus
service: name=prometheus state=restarted
- name: Restart prometheus-pve-exporter
service: name=prometheus-pve-exporter state=restarted
- name: Reload systemd
command: systemctl daemon-reload

View File

@ -25,18 +25,23 @@ rule_files:
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
{% if node_targets is defined %}
- job_name: node
static_configs:
- targets:
{% for target in node_targets %}
- {{ target }}
{% endfor %}
{% endif %}
{% if fastd_targets is defined %}
- job_name: fastd
static_configs:
- targets:
{% for target in fastd_targets %}
- {{ target }}
{% endfor %}
{% endif %}
{% if pve_targets is defined %}
- job_name: pve
static_configs:
- targets:
@ -53,3 +58,4 @@ scrape_configs:
target_label: instance
- target_label: __address__
replacement: 127.0.0.1:9221
{% endif %}