summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus/server
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-09-22 01:10:47 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-09-22 01:10:47 +0200
commitc4e17105ac2086033378b865c600d09d112cc6d3 (patch)
tree5b1573b23c42878e680b23ca07397283287e2f83 /roles/monitoring/prometheus/server
parentprometheus: simplify job config (diff)
cosmetic changes
Diffstat (limited to 'roles/monitoring/prometheus/server')
-rw-r--r--roles/monitoring/prometheus/server/templates/prometheus.yml.j22
-rw-r--r--roles/monitoring/prometheus/server/templates/targets/blackbox-https.yml.j24
-rw-r--r--roles/monitoring/prometheus/server/templates/targets/blackbox-ping.yml.j24
-rw-r--r--roles/monitoring/prometheus/server/templates/targets/blackbox-ssh.yml.j24
-rw-r--r--roles/monitoring/prometheus/server/templates/targets/generic.yml.j24
-rw-r--r--roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j24
6 files changed, 11 insertions, 11 deletions
diff --git a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
index 3286bb82..4a079896 100644
--- a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
@@ -25,7 +25,7 @@ scrape_configs:
static_configs:
- targets: ['localhost:9090']
labels:
- instance: "{{ inventory_hostname }}"
+ instance: '{{ inventory_hostname }}'
{% if prometheus_server_alertmanager is defined %}
- job_name: 'alertmanager'
diff --git a/roles/monitoring/prometheus/server/templates/targets/blackbox-https.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/blackbox-https.yml.j2
index e843de36..b1a33df3 100644
--- a/roles/monitoring/prometheus/server/templates/targets/blackbox-https.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/targets/blackbox-https.yml.j2
@@ -1,4 +1,4 @@
-- targets: [ "{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}" ]
+- targets: [ '{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}' ]
labels:
- instance: "{{ target.instance }}"
+ instance: '{{ target.instance }}'
__param_target: {{ target.config.address }}
diff --git a/roles/monitoring/prometheus/server/templates/targets/blackbox-ping.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/blackbox-ping.yml.j2
index e843de36..b1a33df3 100644
--- a/roles/monitoring/prometheus/server/templates/targets/blackbox-ping.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/targets/blackbox-ping.yml.j2
@@ -1,4 +1,4 @@
-- targets: [ "{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}" ]
+- targets: [ '{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}' ]
labels:
- instance: "{{ target.instance }}"
+ instance: '{{ target.instance }}'
__param_target: {{ target.config.address }}
diff --git a/roles/monitoring/prometheus/server/templates/targets/blackbox-ssh.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/blackbox-ssh.yml.j2
index e843de36..b1a33df3 100644
--- a/roles/monitoring/prometheus/server/templates/targets/blackbox-ssh.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/targets/blackbox-ssh.yml.j2
@@ -1,4 +1,4 @@
-- targets: [ "{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}" ]
+- targets: [ '{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}' ]
labels:
- instance: "{{ target.instance }}"
+ instance: '{{ target.instance }}'
__param_target: {{ target.config.address }}
diff --git a/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2
index 45af10c0..6591362b 100644
--- a/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/targets/generic.yml.j2
@@ -1,3 +1,3 @@
-- targets: [ "{{ hostvars[target.instance].prometheus_scrape_endpoint }}" ]
+- targets: [ '{{ hostvars[target.instance].prometheus_scrape_endpoint }}' ]
labels:
- instance: "{{ target.instance }}"
+ instance: '{{ target.instance }}'
diff --git a/roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j2 b/roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j2
index da3de3d7..d63d79a7 100644
--- a/roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/targets/nut-ups.yml.j2
@@ -1,6 +1,6 @@
-- targets: [ "{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}" ]
+- targets: [ '{{ hostvars[target.config.exporter_hostname].prometheus_scrape_endpoint }}' ]
labels:
- instance: "{{ target.instance }}"
+ instance: '{{ target.instance }}'
__param_ups: {{ target.config.ups }}
__param_server: {{ target.config.server | default('127.0.0.1') }}
{% if 'username' in target.config %}