Skip to content

Commit bf19ab9

Browse files
JuArceMauroToscano
andauthored
infra(prometheus): update rules to support multiple batchers and aggregators (#2209)
Co-authored-by: Mauro Toscano <[email protected]>
1 parent 37c6b0a commit bf19ab9

File tree

1 file changed

+2
-2
lines changed
  • infra/ansible/playbooks/files/prometheus

1 file changed

+2
-2
lines changed

infra/ansible/playbooks/files/prometheus/rules.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ groups:
1717

1818
- alert: TaskDifferenceAggregatorBatcher
1919
# Condition for alerting
20-
expr: floor(increase(aligned_aggregator_received_tasks{job="aligned-aggregator"}[15m])) - on() floor(increase(sent_batches{job="aligned-batcher"}[15m])) > 1
20+
expr: floor(max(increase(aligned_aggregator_received_tasks{job="aligned-aggregator"}[15m]))) - on() floor(sum(increase(sent_batches{job="aligned-batcher"}[15m]))) > 1
2121
for: 30s
2222
# Annotation - additional informational labels to store more information
2323
annotations:
@@ -30,7 +30,7 @@ groups:
3030

3131
- alert: TaskDifferenceAggregator
3232
# Condition for alerting
33-
expr: floor(increase(aligned_aggregator_received_tasks{job="aligned-aggregator"}[15m])) - floor(increase(aligned_aggregated_responses{job="aligned-aggregator"}[15m])) > 1
33+
expr: floor(max(increase(aligned_aggregator_received_tasks{job="aligned-aggregator"}[15m]))) - floor(sum(increase(aligned_aggregated_responses{job="aligned-aggregator"}[15m]))) > 1
3434
for: 30s
3535
# Annotation - additional informational labels to store more information
3636
annotations:

0 commit comments

Comments
 (0)