From 6ba8e72412f9ee47755d8f5cee41874bcd717540 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 21 Jun 2024 00:25:07 +0200 Subject: revamp prometheus metric lables for whawty-nginx-sso --- .../prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'roles/monitoring/prometheus/exporter/register/templates') diff --git a/roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2 b/roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2 index 74ada64e..8675a143 100644 --- a/roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2 +++ b/roles/monitoring/prometheus/exporter/register/templates/whawty-nginx-sso.yml.j2 @@ -1,7 +1,9 @@ - targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ] labels: instance: '{{ target.instance }}' - __metrics_path__: '/whawty-nginx-sso/{{ target.config.instance_name }}' + app_kind: 'whawty-nginx-sso' + app_instance: '{{ target.config.app_instance }}' + __metrics_path__: '/whawty-nginx-sso/{{ target.config.app_instance }}' {% for name, value in prometheus_target_labels.items() %} {{ name }}: '{{ value }}' {% endfor %} -- cgit v1.2.3