Files
awoooi/ops/monitoring/tests/test_backup_alert_receipt_rules.yml
ogt a535fa652f
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m22s
CD Pipeline / build-and-deploy (push) Successful in 11m52s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 21s
CD Pipeline / post-deploy-checks (push) Successful in 2m29s
fix(backup): preserve alert receipt identity
2026-07-15 01:08:44 +08:00

46 lines
2.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
rule_files:
- ../alerts-unified.yml
evaluation_interval: 1m
tests:
- name: backup receipt alert preserves each required alert identity
interval: 1m
input_series:
- series: 'ALERTS{alertname="BackupScheduleSingletonMismatch",alertstate="firing",host="110"}'
values: '1x40'
- series: 'ALERTS{alertname="BackupRetentionPolicyNotLatestOnly",alertstate="firing",host="110"}'
values: '1x40'
alert_rule_test:
- eval_time: 31m
alertname: BackupAlertReceiptStageMissing
exp_alerts:
- exp_labels:
alert_category: infrastructure
auto_repair: "false"
component: backup-alert-receipt
host: "110"
layer: host-backup
notification_type: TYPE-1
required_alert: BackupScheduleSingletonMismatch
severity: warning
team: ops
exp_annotations:
summary: "110 正在發生的備份告警 BackupScheduleSingletonMismatch 尚未完成 receipt 閉環"
description: "BackupScheduleSingletonMismatch 正在 firing但尚無新鮮的 Telegram/AwoooP sent/received/dedup/escalation 完整 receipt未 firing 的規則不再產生假告警。"
runbook: '查 awoooi_backup_alert_receipt_stage_fresh{host="110",required_alert="BackupScheduleSingletonMismatch"} 取得缺少階段;只補 timestamp/evidence id不得寫入 token、chat raw payload 或 secret。'
- exp_labels:
alert_category: infrastructure
auto_repair: "false"
component: backup-alert-receipt
host: "110"
layer: host-backup
notification_type: TYPE-1
required_alert: BackupRetentionPolicyNotLatestOnly
severity: warning
team: ops
exp_annotations:
summary: "110 正在發生的備份告警 BackupRetentionPolicyNotLatestOnly 尚未完成 receipt 閉環"
description: "BackupRetentionPolicyNotLatestOnly 正在 firing但尚無新鮮的 Telegram/AwoooP sent/received/dedup/escalation 完整 receipt未 firing 的規則不再產生假告警。"
runbook: '查 awoooi_backup_alert_receipt_stage_fresh{host="110",required_alert="BackupRetentionPolicyNotLatestOnly"} 取得缺少階段;只補 timestamp/evidence id不得寫入 token、chat raw payload 或 secret。'