Skip to content

Commit 206edf8

Browse files
author
Davide Bizzarri
committed
fix: kubelet rules group_left
When the right hand-side of the operations returns multiple matches the rules fails. This fix aim to prevent such failure.
1 parent 1f25589 commit 206edf8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rules/kubelet.libsonnet

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
{
1212
record: 'node_quantile:kubelet_pleg_relist_duration_seconds:histogram_quantile',
1313
expr: |||
14-
histogram_quantile(%(quantile)s, sum(rate(kubelet_pleg_relist_duration_seconds_bucket{%(kubeletSelector)s}[5m])) by (%(clusterLabel)s, instance, le) * on(%(clusterLabel)s, instance) group_left(node) kubelet_node_name{%(kubeletSelector)s})
14+
histogram_quantile(
15+
%(quantile)s,
16+
sum(rate(kubelet_pleg_relist_duration_seconds_bucket{%(kubeletSelector)s}[5m])) by (%(clusterLabel)s, instance, le)
17+
* on(%(clusterLabel)s, instance) group_left (node)
18+
max by (%(clusterLabel)s, instance, node) (kubelet_node_name{%(kubeletSelector)s})
19+
)
1520
||| % ({ quantile: quantile } + $._config),
1621
labels: {
1722
quantile: quantile,

0 commit comments

Comments
 (0)