summaryrefslogtreecommitdiff
path: root/roles
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2021-07-27 18:06:50 +0200
committerChristian Pointner <equinox@spreadspace.org>2021-07-27 18:06:50 +0200
commitbabb9bcda6b01087c0cb80abac7cd6b37b4dfe3d (patch)
tree05a44337da52b7589b7cf1f9562efa3a876078a7 /roles
parentele-telesto: prepare vm host (diff)
ele-mon basic install
Diffstat (limited to 'roles')
-rw-r--r--roles/monitoring/prometheus/server/defaults/main/main.yml2
-rw-r--r--roles/monitoring/prometheus/server/templates/prometheus.yml.j271
2 files changed, 5 insertions, 68 deletions
diff --git a/roles/monitoring/prometheus/server/defaults/main/main.yml b/roles/monitoring/prometheus/server/defaults/main/main.yml
index c9291172..b109b3b1 100644
--- a/roles/monitoring/prometheus/server/defaults/main/main.yml
+++ b/roles/monitoring/prometheus/server/defaults/main/main.yml
@@ -7,6 +7,8 @@ prometheus_server_retention: "15d"
prometheus_server_jobs:
- node
+#prometheus_server_jobs_extra: |
+# - job_name: ...
prometheus_server_rules:
prometheus: "{{ prometheus_server_rules_prometheus + ((prometheus_server_alertmanager is defined) | ternary(prometheus_server_rules_prometheus_alertmanager, [])) + prometheus_server_rules_prometheus_extra }}"
diff --git a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2 b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
index 69d5bcdc..6845a2d2 100644
--- a/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
+++ b/roles/monitoring/prometheus/server/templates/prometheus.yml.j2
@@ -51,71 +51,6 @@ scrape_configs:
- files:
- "/etc/prometheus/jobs/{{ job }}/*.yml"
{% endfor %}
-
- ## TODO: temporary test
- - job_name: 'ping'
- metrics_path: /proxy
- params:
- module:
- - blackbox
- - icmp
- scheme: https
- tls_config:
- ca_file: /etc/ssl/prometheus/ca-crt.pem
- cert_file: /etc/ssl/prometheus/server/scrape-crt.pem
- key_file: /etc/ssl/prometheus/server/scrape-key.pem
- static_configs:
- - targets:
- - 62.99.185.129
- - 9.9.9.9
- relabel_configs:
- - source_labels: [__address__]
- target_label: __param_target
- - source_labels: [__param_target]
- target_label: instance
- - target_label: __address__
- replacement: 192.168.32.230:9999
-
- - job_name: 'https'
- metrics_path: /proxy
- params:
- module:
- - blackbox
- - http_tls_2xx
- scheme: https
- tls_config:
- ca_file: /etc/ssl/prometheus/ca-crt.pem
- cert_file: /etc/ssl/prometheus/server/scrape-crt.pem
- key_file: /etc/ssl/prometheus/server/scrape-key.pem
- static_configs:
- - targets:
- - web.chaos-at-home.org
- relabel_configs:
- - source_labels: [__address__]
- target_label: __param_target
- - source_labels: [__param_target]
- target_label: instance
- - target_label: __address__
- replacement: 192.168.32.230:9999
-
- - job_name: 'ssh'
- metrics_path: /proxy
- params:
- module:
- - blackbox
- - ssh_banner
- scheme: https
- tls_config:
- ca_file: /etc/ssl/prometheus/ca-crt.pem
- cert_file: /etc/ssl/prometheus/server/scrape-crt.pem
- key_file: /etc/ssl/prometheus/server/scrape-key.pem
- static_configs:
- - targets:
- - 192.168.32.230:222
- relabel_configs:
- - source_labels: [__address__]
- target_label: __param_target
- - target_label: instance
- replacement: 'ch-mon'
- - target_label: __address__
- replacement: 192.168.32.230:9999
+{% if prometheus_server_jobs_extra is defined %}
+ {{ prometheus_server_jobs_extra | indent(2) }}
+{% endif %}