Page MenuHomePhabricator

[kyverno] policy countres stopped showing correctly in grafana
Closed, ResolvedPublic

Description

It seems that due to a change in the default configuration:

https://github.com/kyverno/kyverno/commit/eb72b04d2c130fabd39bdd0eec0ea36fd8a08c70

The metric kyverno_policy_rule_info_total is being exported without the namespace, and that causes it to not report per-tool metrics. Given that it's what we use for alerts and graphs (https://grafana-rw.wmcloud.org/d/kyverno/kyverno), we should either fix it or stop using that metric.

The alert Toolforge Kyverno has low amount of policy resources.

Event Timeline

dcaro updated the task description. (Show Details)

Updated the config to not delete the namespace related labels from that metric, and they are showing up now on grafana:

image.png (537×2 px, 156 KB)

I also improved the graphs to pick up the correct datasource (it was hard-coded, ignoring the selected one).

Hmm... the alert is summing by pod, without caring if there's any old pods:

image.png (736×1 px, 229 KB)

So it will take some time to go away, let me try to improve the query instead

dcaro triaged this task as Medium priority.Aug 12 2025, 3:14 PM
dcaro moved this task from Next Up to In Review on the Toolforge (Toolforge iteration 23) board.
dcaro moved this task from In Review to Done on the Toolforge (Toolforge iteration 23) board.

Enabled on toolsbeta too