summaryrefslogtreecommitdiff
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
parentprometheus: simplify job config (diff)
cosmetic changes
-rw-r--r--roles/monitoring/prometheus/exporter/blackbox/templates/config.yml.j22
-rw-r--r--roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j24
-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
8 files changed, 14 insertions, 14 deletions
diff --git a/roles/monitoring/prometheus/exporter/blackbox/templates/config.yml.j2 b/roles/monitoring/prometheus/exporter/blackbox/templates/config.yml.j2
index 01e3f7a0..0ff9db13 100644
--- a/roles/monitoring/prometheus/exporter/blackbox/templates/config.yml.j2
+++ b/roles/monitoring/prometheus/exporter/blackbox/templates/config.yml.j2
@@ -1,4 +1,4 @@
# {{ ansible_managed }}
modules:
- {{ prometheus_exporter_blackbox_modules | combine(prometheus_exporter_blackbox_modules_extra) | to_nice_yaml(indent=2) | indent(2)}}
+ {{ prometheus_exporter_blackbox_modules | combine(prometheus_exporter_blackbox_modules_extra) | to_nice_yaml(indent=2) | indent(2) }}
diff --git a/roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2 b/roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2
index a2dc1c71..576ee12f 100644
--- a/roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2
+++ b/roles/monitoring/prometheus/exporter/mikrotik/templates/config.yml.j2
@@ -1,7 +1,7 @@
# {{ ansible_managed }}
devices:
- {{ prometheus_exporter_mikrotik_devices | to_nice_yaml(indent=2) | indent(2)}}
+ {{ prometheus_exporter_mikrotik_devices | to_nice_yaml(indent=2) | indent(2) }}
features:
- {{ prometheus_exporter_mikrotik_features | to_nice_yaml(indent=2) | indent(2)}}
+ {{ prometheus_exporter_mikrotik_features | to_nice_yaml(indent=2) | indent(2) }}
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 %}