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: