From 4c9ffaf319d457c2a742466d7af012bb84d8afa8 Mon Sep 17 00:00:00 2001 From: Chris Sibbitt Date: Tue, 8 Sep 2026 14:27:37 -0400 Subject: [PATCH] Remove unhelpful labelDrops in scrapeConfig This was reported informally as a bug agaisnt this example alert: https://github.com/openstack-k8s-operators/telemetry-operator/blob/main/docs/sample-alerts/openstack-observability-services-status.yaml#L23 User states that Pod label doesn't exist. This labelDrop configuration dates back to STF, when none of the OSP17 services ran in OCP. These labels were meaningless/misleading at the time, always reflecting values of the smart-gateway rather than the actual services in question (nothing in the OSP17 control-plane ran in a "pod" or "namespace", and the "job" was always the same). I've opted to continue to drop "publisher", concurring with Juan's opinion on the matter. I've checked it and says "ceilometer" on 171 series in my environment, and "ceilometer-0" on 1 series. That's a question I'm not going to tackle right now, but the label doesn't seem terribly useful, so we'll continue to drop it. --- internal/metricstorage/scrape_config.go | 15 --------------- test/kuttl/tests/metricstorage/01-assert.yaml | 12 ------------ test/kuttl/tests/metricstorage/04-assert.yaml | 12 ------------ 3 files changed, 39 deletions(-) diff --git a/internal/metricstorage/scrape_config.go b/internal/metricstorage/scrape_config.go index bef56bfcf..3e44c25b4 100644 --- a/internal/metricstorage/scrape_config.go +++ b/internal/metricstorage/scrape_config.go @@ -232,21 +232,6 @@ func ScrapeConfig( }, Spec: monv1alpha1.ScrapeConfigSpec{ MetricRelabelConfigs: []monv1.RelabelConfig{ - { - Action: "labeldrop", - Regex: "pod", - SourceLabels: []monv1.LabelName{}, - }, - { - Action: "labeldrop", - Regex: "namespace", - SourceLabels: []monv1.LabelName{}, - }, - { - Action: "labeldrop", - Regex: "job", - SourceLabels: []monv1.LabelName{}, - }, { Action: "labeldrop", Regex: "publisher", diff --git a/test/kuttl/tests/metricstorage/01-assert.yaml b/test/kuttl/tests/metricstorage/01-assert.yaml index d5299065a..aee491a97 100644 --- a/test/kuttl/tests/metricstorage/01-assert.yaml +++ b/test/kuttl/tests/metricstorage/01-assert.yaml @@ -42,12 +42,6 @@ metadata: spec: scrapeInterval: 30s metricRelabelings: - - action: labeldrop - regex: pod - - action: labeldrop - regex: namespace - - action: labeldrop - regex: job - action: labeldrop regex: publisher --- @@ -150,12 +144,6 @@ metadata: spec: scrapeInterval: 30s metricRelabelings: - - action: labeldrop - regex: pod - - action: labeldrop - regex: namespace - - action: labeldrop - regex: job - action: labeldrop regex: publisher --- diff --git a/test/kuttl/tests/metricstorage/04-assert.yaml b/test/kuttl/tests/metricstorage/04-assert.yaml index 3c7f1d380..9fc4a1854 100644 --- a/test/kuttl/tests/metricstorage/04-assert.yaml +++ b/test/kuttl/tests/metricstorage/04-assert.yaml @@ -53,12 +53,6 @@ metadata: spec: scrapeInterval: 40s metricRelabelings: - - action: labeldrop - regex: pod - - action: labeldrop - regex: namespace - - action: labeldrop - regex: job - action: labeldrop regex: publisher --- @@ -161,11 +155,5 @@ metadata: spec: scrapeInterval: 40s metricRelabelings: - - action: labeldrop - regex: pod - - action: labeldrop - regex: namespace - - action: labeldrop - regex: job - action: labeldrop regex: publisher