Skip to content

Commit 0e20eb4

Browse files
committed
Test the ingestion producer alerts
The ingestion alerts were the only ones shipped without a rendering and unit test step, so a rule could be published broken or silent. Cover the new setup failure alert: it fires on a source that keeps failing, stays silent on one that recovers, and the ratio alerts are asserted silent on the same series to pin down why it is needed. Issue: BB-605
1 parent d26a681 commit 0e20eb4

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

.github/workflows/alerts.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,17 @@ jobs:
7272
notification_processor_replicas=2
7373
github_token: ${{ secrets.GIT_ACCESS_TOKEN }}
7474

75+
- name: Render and test ingestion producer
76+
uses: scality/action-prom-render-test@1.0.3
77+
with:
78+
alert_file_path: monitoring/ingestion/ingestion-producer-alert.yaml
79+
test_file_path: monitoring/ingestion/ingestion-producer-alert.test.yaml
80+
alert_inputs: |
81+
namespace=zenko
82+
job_ingestion_producer=artesca-data-backbeat-ingestion-producer-headless
83+
replicas=1
84+
github_token: ${{ secrets.GIT_ACCESS_TOKEN }}
85+
7586
- name: Render and test oplog populator
7687
uses: scality/action-prom-render-test@1.0.3
7788
with:
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
evaluation_interval: 1m
2+
rule_files:
3+
- ingestion-producer-alert.rendered.yaml
4+
5+
tests:
6+
7+
# A source whose setup keeps failing is retried on every cron tick, so it
8+
# fails at a steady rate while every other source keeps reading normally.
9+
- name: Ingestion Producer Source Setup Failing
10+
interval: 1m
11+
input_series:
12+
- series: s3_ingestion_source_operations_total{namespace="zenko",job="artesca-data-backbeat-ingestion-producer-headless",origin="ingestion",op="getRaftId",status="error"}
13+
values: 0+12x20
14+
- series: s3_ingestion_source_operations_total{namespace="zenko",job="artesca-data-backbeat-ingestion-producer-headless",origin="ingestion",op="getRaftLog",status="success"}
15+
values: 0+12000x20
16+
alert_rule_test:
17+
- alertname: IngestionProducerSourceSetupFailing
18+
eval_time: 5m
19+
exp_alerts: []
20+
- alertname: IngestionProducerSourceSetupFailing
21+
eval_time: 12m
22+
exp_alerts:
23+
- exp_labels:
24+
severity: warning
25+
exp_annotations:
26+
zenko_service: backbeat-ingestion-producer
27+
description: "Ingestion producer has been unable to start reading from a source for the last 10 minutes, so the objects of that location are not ingested. Check the producer logs for the bucket it fails to resolve."
28+
summary: "Ingestion producer cannot start reading from a source"
29+
# The same failures are 0.1% of all the source operations, which is why the
30+
# error ratio alerts cannot report a single source that stopped ingesting.
31+
- alertname: IngestionProducerSourceErrorRate3Percent
32+
eval_time: 12m
33+
exp_alerts: []
34+
- alertname: IngestionProducerSourceErrorRate5Percent
35+
eval_time: 12m
36+
exp_alerts: []
37+
38+
# A source that fails to set up while its location restarts, then recovers,
39+
# must not alert.
40+
- name: Ingestion Producer Source Setup Recovering
41+
interval: 1m
42+
input_series:
43+
- series: s3_ingestion_source_operations_total{namespace="zenko",job="artesca-data-backbeat-ingestion-producer-headless",origin="ingestion",op="getRaftId",status="error"}
44+
values: 0 12 24 24x17
45+
- series: s3_ingestion_source_operations_total{namespace="zenko",job="artesca-data-backbeat-ingestion-producer-headless",origin="ingestion",op="getRaftId",status="success"}
46+
values: 0 0 0 1+1x17
47+
alert_rule_test:
48+
- alertname: IngestionProducerSourceSetupFailing
49+
eval_time: 8m
50+
exp_alerts: []
51+
- alertname: IngestionProducerSourceSetupFailing
52+
eval_time: 15m
53+
exp_alerts: []

0 commit comments

Comments
 (0)