diff options
author | Christian Pointner <equinox@spreadspace.org> | 2024-06-20 19:35:10 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2024-06-20 19:35:10 +0200 |
commit | 6cd14100e53002280286af048a7dca4e7127ebd3 (patch) | |
tree | 2893b2ae017eb0b84413f2693b8ca2b34eeeafd2 /roles/monitoring/prometheus/exporter | |
parent | grafana: create new dashboards for revamped blackbox exporter metric labels (diff) |
rename new blackbox-exporter metric label from svc_name to svc_instance
Diffstat (limited to 'roles/monitoring/prometheus/exporter')
-rw-r--r-- | roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py | 2 | ||||
-rw-r--r-- | roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2 | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py b/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py index 27ba29e6..9c99113d 100644 --- a/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py +++ b/roles/monitoring/prometheus/exporter/register/filter_plugins/prometheus.py @@ -7,7 +7,7 @@ from ansible import errors _multitarget_id_map_ = { - "blackbox/probe": (lambda vars, config: (vars['inventory_hostname'], "%s-%s" % (config['svc_kind'], config['svc_name']))), + "blackbox/probe": (lambda vars, config: (vars['inventory_hostname'], "%s-%s" % (config['svc_kind'], config['svc_instance']))), } diff --git a/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2 index 6319c1c5..fbbce7df 100644 --- a/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2 +++ b/roles/monitoring/prometheus/exporter/register/templates/blackbox/probe.yml.j2 @@ -2,7 +2,7 @@ labels: instance: '{{ target.instance }}' svc_kind: '{{ target.config.svc_kind }}' - svc_name: '{{ target.config.svc_name }}' + svc_instance: '{{ target.config.svc_instance }}' __param_target: '{{ target.config.target }}' __param_module: '{{ target.config.module }}' {% if 'hostname' in target.config %} |