summaryrefslogtreecommitdiff
path: root/roles/monitoring/prometheus
diff options
context:
space:
mode:
Diffstat (limited to 'roles/monitoring/prometheus')
-rw-r--r--roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py1
-rw-r--r--roles/monitoring/prometheus/exporter/register/templates/ssl/probe.yml.j22
2 files changed, 3 insertions, 0 deletions
diff --git a/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py b/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py
index 57b69a13..473eb655 100644
--- a/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py
+++ b/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py
@@ -8,6 +8,7 @@ from ansible import errors
_multitarget_id_map_ = {
"blackbox/probe": (lambda vars, config: (vars['inventory_hostname'], "%s-%s" % (config['svc_kind'], config['svc_instance']))),
+ "ssl/probe": (lambda vars, config: (vars['inventory_hostname'], "%s-%s-%s" % (config['module'], config['sslcert_instance'], vars['inventory_hostname']))),
"whawty-nginx-sso": (lambda vars, config: (vars['inventory_hostname'], "%s-%s" % (config['app_instance'], vars['inventory_hostname']))),
}
diff --git a/roles/monitoring/prometheus/exporter/register/templates/ssl/probe.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/ssl/probe.yml.j2
index 3ecf129a..6d26e779 100644
--- a/roles/monitoring/prometheus/exporter/register/templates/ssl/probe.yml.j2
+++ b/roles/monitoring/prometheus/exporter/register/templates/ssl/probe.yml.j2
@@ -1,6 +1,8 @@
- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ]
labels:
instance: '{{ target.instance }}'
+ sslcert_kind: '{{ target.config.module }}'
+ sslcert_instance: '{{ target.config.sslcert_instance }}'
__param_target: '{{ target.config.target }}'
__param_module: '{{ target.config.module }}'
{% for name, value in prometheus_target_labels.items() %}