diff options
| author | Paul Buetow <paul@buetow.org> | 2026-01-19 22:03:10 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-01-19 22:03:21 +0200 |
| commit | bc8e4e2002516fe40d4ca70d5f7379a1945d571a (patch) | |
| tree | 31462e63ee903025af308dd9b3bed34061b00e7f | |
| parent | 55229ad06ed229c859082bb34085f277af7d8bea (diff) | |
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 <noreply@anthropic.com>
| -rw-r--r-- | f3s/prometheus/manifests/additional-scrape-configs-secret.yaml | 40 |
1 files 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 |
