Skip to content

Commit

Permalink
Fix OTEL alerts query (#1818)
Browse files Browse the repository at this point in the history
  • Loading branch information
thampiotr authored Oct 4, 2024
1 parent 8d97a39 commit 8417042
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions operations/alloy-mixin/alerts/opentelemetry.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ local alert = import './utils/alert.jsonnet';
local successRateQuery(enableK8sCluster, failed, success) =
local sumBy = if enableK8sCluster then "cluster, namespace, job" else "job";
|||
(1 - sum by (%s) (
rate(%s{}[1m])
(1 - (
sum by (%s) (rate(%s{}[1m]))
/
(rate(%s{}[1m]) + rate(%s{}[1m]))
sum by (%s) (rate(%s{}[1m]) + rate(%s{}[1m]))
)
) < 0.95
||| % [sumBy, failed, failed, success],
||| % [sumBy, failed, sumBy, failed, success],

newOpenTelemetryAlertsGroup(enableK8sCluster=true):
alert.newGroup(
Expand Down

0 comments on commit 8417042

Please sign in to comment.