From 28e9609b9aef8506c4865f898ea4b3aaced7146f Mon Sep 17 00:00:00 2001 From: Michael Jerger <michael.jerger@meissa-gmbh.de> Date: Mon, 10 Mar 2025 16:53:50 +0100 Subject: [PATCH] define scraping --- src/main/resources/monitoring/prometheus-prometheus.yaml | 5 +++++ src/main/resources/monitoring/push-gw-service-account.yaml | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/resources/monitoring/prometheus-prometheus.yaml b/src/main/resources/monitoring/prometheus-prometheus.yaml index 2ffa360..7c1b917 100644 --- a/src/main/resources/monitoring/prometheus-prometheus.yaml +++ b/src/main/resources/monitoring/prometheus-prometheus.yaml @@ -62,3 +62,8 @@ scrape_configs: - job_name: "prometheus" static_configs: - targets: ["localhost:9090"] + + - job_name: pushgateway + honor_labels: true + static_configs: + - targets: ['prometheus-pushgateway:9091'] diff --git a/src/main/resources/monitoring/push-gw-service-account.yaml b/src/main/resources/monitoring/push-gw-service-account.yaml index c223e65..823e410 100644 --- a/src/main/resources/monitoring/push-gw-service-account.yaml +++ b/src/main/resources/monitoring/push-gw-service-account.yaml @@ -3,6 +3,6 @@ kind: ServiceAccount metadata: labels: app.kubernetes.io/name: prometheus-pushgateway - name: x-prometheus-pushgateway + name: prometheus-pushgateway namespace: monitoring automountServiceAccountToken: true \ No newline at end of file