Skip to content

Commit fdcc25f

Browse files
authored
fix(monitoring): stop parca-analytics from loading PrometheusRules (#475)
Confirmed via Polar Signals Cloud: ALERTS/ALERTS_FOR_STATE series were showing up alongside the real fleet metrics. ruleSelector/ ruleNamespaceSelector were left at the {} default, so this instance was loading and evaluating every PrometheusRule it has RBAC for, including its own now-orphaned thanos-sidecar-rules (the sidecar isn't scraped anymore either). Same match-nothing pattern as the PodMonitor/ServiceMonitor selectors: parca-analytics only ingests via remote-write, it doesn't scrape or evaluate rules.
1 parent 2f0b29f commit fdcc25f

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

monitoring/environments/scaleway-parca-demo/main.jsonnet

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,13 @@ local prometheuses = [
345345
serviceMonitorNamespaceSelector: { matchLabels: { 'kubernetes.io/metadata.name': p._config.namespace } },
346346
podMonitorSelector: { matchLabels: { 'prometheus-operator-select-nothing': 'true' } },
347347
serviceMonitorSelector: { matchLabels: { 'prometheus-operator-select-nothing': 'true' } },
348+
// Same reasoning as the PodMonitor/ServiceMonitor selectors above: this
349+
// instance shouldn't evaluate any rules either. The default {} ruleSelector
350+
// was loading every PrometheusRule it has RBAC for, including its own
351+
// thanos-sidecar-rules, which populated ALERTS/ALERTS_FOR_STATE series that
352+
// then got swept up by remote-write to Polar Signals Cloud.
353+
ruleNamespaceSelector: { matchLabels: { 'prometheus-operator-select-nothing': 'true' } },
354+
ruleSelector: { matchLabels: { 'prometheus-operator-select-nothing': 'true' } },
348355
resources+: {
349356
requests+: { cpu: '500m' },
350357
},

0 commit comments

Comments
 (0)