From bc8e4e2002516fe40d4ca70d5f7379a1945d571a Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 19 Jan 2026 22:03:10 +0200 Subject: fix radicale scrape config causing TargetDown alert Radicale does not expose Prometheus metrics. The previous config tried to scrape /.web/ which returns HTML, causing parse errors. Synced with additional-scrape-configs.yaml which properly drops radicale from scraping. Co-Authored-By: Claude Opus 4.5 --- .../additional-scrape-configs-secret.yaml | 40 ++++++++++++++++------ 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/f3s/prometheus/manifests/additional-scrape-configs-secret.yaml b/f3s/prometheus/manifests/additional-scrape-configs-secret.yaml index 4f599e8..901f076 100644 --- a/f3s/prometheus/manifests/additional-scrape-configs-secret.yaml +++ b/f3s/prometheus/manifests/additional-scrape-configs-secret.yaml @@ -28,16 +28,36 @@ stringData: - targets: - 'pushgateway.monitoring.svc.cluster.local:9091' - # Radicale CalDAV/CardDAV server health monitoring - # Radicale doesn't expose Prometheus metrics, so we scrape the web interface - # and rely on the 'up' metric to determine if the service is available - - job_name: 'radicale' - metrics_path: '/.web/' + # Radicale does not expose Prometheus metrics, so we don't scrape it. + # The radicale-drop job and kubernetes-services-no-radicale job below + # ensure radicale is excluded from any service discovery. + + # Drop radicale service from being scraped (does not expose Prometheus metrics) + - job_name: 'radicale-drop' static_configs: - targets: - 'radicale-service.services.svc.cluster.local:80' - labels: - service: radicale - namespace: services - scrape_interval: 30s - scrape_timeout: 10s + relabel_configs: + - source_labels: [__address__] + action: drop + + # Kubernetes service discovery with radicale dropped + - job_name: 'kubernetes-services-no-radicale' + kubernetes_sd_configs: + - role: service + namespaces: + names: + - services + relabel_configs: + # Drop radicale service + - source_labels: [__meta_kubernetes_service_name] + regex: radicale-service + action: drop + # Keep only metrics ports + - source_labels: [__meta_kubernetes_service_port_name] + regex: metrics|prometheus + action: keep + - source_labels: [__meta_kubernetes_service_name] + target_label: job + - source_labels: [__meta_kubernetes_namespace] + target_label: namespace -- cgit v1.2.3