From ef4432c51bacb5b92c03a42cb1ea7f9d837ec8b6 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 23 Sep 2021 16:50:24 +0200 Subject: use / as spereator for jobs formerly known as special --- roles/monitoring/prometheus/server/filter_plugins/prometheus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'roles/monitoring/prometheus/server/filter_plugins/prometheus.py') diff --git a/roles/monitoring/prometheus/server/filter_plugins/prometheus.py b/roles/monitoring/prometheus/server/filter_plugins/prometheus.py index 056d216f..1443e837 100644 --- a/roles/monitoring/prometheus/server/filter_plugins/prometheus.py +++ b/roles/monitoring/prometheus/server/filter_plugins/prometheus.py @@ -11,7 +11,7 @@ def prometheus_job_targets(hostvars, jobs, targets): result = [] for job in jobs: for target in targets: - special_config_varname = 'prometheus_job_' + job.replace('-', '_') + special_config_varname = 'prometheus_job_' + job.replace('-', '_').replace('/', '__') if special_config_varname in hostvars[target]: for config in hostvars[target][special_config_varname]: result.append({'job': job, 'instance': config['instance'], 'config': config, 'enabled': True}) -- cgit v1.2.3