VAT / ZATCA Document Engine is monitored by UBL generation monitor on document generation error rate. It is owned by Compliance Engineering and serves the business services listed below. Use this runbook when an alert fires on this component.
Warning at document generation error rate ≥ 1%, critical at ≥ 3%. Critical means user-visible impact: page the escalation owner.
dashboard: sim://grafana/zatca-doclogs: sim://logs/zatca-docowner: Compliance Engineeringrunbook: RB-ZATCADOC
- Primary metric: document generation error rate (%)
- Warning threshold: ≥ 1%
- Critical threshold: ≥ 3%
- Dashboard: sim://grafana/zatca-doc
- Log source: sim://logs/zatca-doc
- SLA: 99.5% monthly availability
- SLO: 99.9% of requests under warning threshold
- External dependencies: Supabase PostgreSQL / APIs / Realtime
- UBL generation monitor reports document generation error rate above the warning threshold.
- Error volume for this component rises in the log source and error reports.
- Group recent errors in sim://logs/zatca-doc by message and pick the dominant class.
- Determine whether errors are user-input related, permission related or infrastructure related.
- Check whether the failure is confined to one tenant, one flow or one release.
- Confirm whether upstream dependencies are healthy before treating this as a local defect.
- If a recent release correlates, roll it back.
- Disable the specific failing feature path with the feature flag if one exists.
- Queue and retry failed operations instead of discarding them.
- Communicate the affected flow to operators with a manual workaround where possible.
- Confirm document generation error rate has been below the warning threshold for at least 10 minutes.
- Confirm the affected business services are healthy on the dashboard.
- Confirm no alerts remain open for this component and its downstream consumers.
- Spot-check one real end-to-end operation through the affected flow.
- If a deploy caused the incident, roll back to the previous release and re-verify.
- If a configuration or threshold change caused it, restore the previous value and record why.
- Re-enable any job, feature flag or channel that was paused during mitigation, one at a time.
- First responder: NOC on duty — acknowledge within 5 minutes.
- Component owner: Compliance Engineering.
- Escalation owner (page on critical): Compliance Engineering.
- Escalate if the metric is still critical 15 minutes after mitigation, or if data integrity is in doubt.
- Declare a major incident if two or more critical components are alerting at the same time.
Blast radius — business services affected (3)
Sales InvoicingVAT ManagementZATCA E-Invoicing
Supabase PostgreSQL / APIs / Realtime — Primary data plane, RPC and realtime channels
Simulated incidents that exercise this runbook
ZATCA API unavailable — Fatoora clearance/reporting endpoints unreachable; invoices queueing.
- Record start time, actions taken and recovery time in the incident record.
- Attach the dashboard screenshot and the dominant error message to the postmortem.
- Content drafted for the monitoring demo — confirm the exact commands with the owning team before production use.