Skip to content

[usage] Add warning alert when usage reconciliation has not been succesfull for more than an hour #12987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions operations/observability/mixins/meta/rules/usage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,14 @@ spec:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodUsageReconcileInvoicesFailures.md
summary: There are failed Stripe invoice reconciliations.
description: We have accumulated {{ printf "%.2f" $value }} failures. This affects how much customers will be billed.

- alert: GitpodUsageTooLongSinceLastSuccessfulLedgerReconciliation
expr: (time() - gitpod_usage_ledger_last_completed_time{outcome!="success"}) > 60 * 60
for: 30m
labels:
severity: warning
team: webapp
annotations:
runbook_url: https://github.com/gitpod-io/runbooks/blob/main/runbooks/GitpodUsageTooLongSinceLastSuccessfulLedgerReconciliation.md
summary: Usage reconciliation has not run successfully for {{ printf "%.2f" $value }} seconds. Usage data is stale.
description: We have not executed scheduled usage reconciliation for {{ printf "%.2f" $value }} seconds. We expect the data to update every 15 minutes to avoid stale usage records and stale invoices.