From 6e33238de42f2914d26927ab6d942d38f9ca84f6 Mon Sep 17 00:00:00 2001 From: Tom Neuber Date: Thu, 5 Dec 2024 22:49:45 +0100 Subject: [PATCH] fix(sb-server-monitor): resolve server monitor discovery issues --- sb-server-monitor/3-service.yaml | 2 +- sb-server-monitor/4-service-monitor.yaml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/sb-server-monitor/3-service.yaml b/sb-server-monitor/3-service.yaml index 3e0e8f6..8c3e6cc 100644 --- a/sb-server-monitor/3-service.yaml +++ b/sb-server-monitor/3-service.yaml @@ -13,7 +13,7 @@ spec: - name: http-metrics port: 9192 protocol: TCP - targetPort: http-metrics + targetPort: 9192 selector: app: sb-server-monitor-exporter type: ClusterIP diff --git a/sb-server-monitor/4-service-monitor.yaml b/sb-server-monitor/4-service-monitor.yaml index 2b5fb33..fc4011f 100644 --- a/sb-server-monitor/4-service-monitor.yaml +++ b/sb-server-monitor/4-service-monitor.yaml @@ -9,10 +9,17 @@ metadata: name: sb-server-monitor-exporter-servicemonitor namespace: sb-server-monitor spec: + attachMetadata: + node: false endpoints: - interval: 5m path: /metrics port: http-metrics + relabelings: + - action: replace + sourceLabels: + - __meta_kubernetes_endpoint_node_name + targetLabel: node scheme: http jobLabel: jobLabel selector: