Operations
This section covers the operational aspects of running Rack Gateway in production, including monitoring, maintenance, upgrades, and troubleshooting.
Operational Areas
Section titled “Operational Areas”MonitoringHealth checks, metrics, and error tracking with Sentry.
Database MaintenanceMigrations, backups, and data management.
TroubleshootingCommon issues and how to resolve them.
UpgradesUpgrading Rack Gateway to new versions.
Quick Reference
Section titled “Quick Reference”Health Endpoint
Section titled “Health Endpoint”| Endpoint | Healthy | Unhealthy |
|---|---|---|
/api/v1/health | 200 {"status":"ok","service":"rack-gateway"} | 503 {"status":"unhealthy",...,"error":"..."} for a minute after an audit write fails |
It’s the only health endpoint. It doesn’t query the database: a request that fails to reach it shows up as errors in the logs and Sentry.
Common Commands
Section titled “Common Commands”# Check gateway healthcurl https://gateway.example.com/api/v1/health
# Check the audit log's hash chain and anchors (run on the gateway, e.g. via convox run)./rack-gateway-api verify-audit
# Apply pending migrations./rack-gateway-api migrateRecent audit logs are on the web UI’s Audit Logs page, and GET /api/v1/audit-logs (admin).
Log Locations
Section titled “Log Locations”| Deployment | Log Location |
|---|---|
| Docker | docker logs <container> |
| Convox | convox logs -a rack-gateway |
Operational Runbooks
Section titled “Operational Runbooks”Daily Checks
Section titled “Daily Checks”- Verify the health endpoint responds
- Check error tracking (Sentry) for new issues
- Review audit logs for unusual activity, and Slack alerts for a failed audit verification
Weekly Tasks
Section titled “Weekly Tasks”- Review user access patterns
- Check for unused API tokens
- Verify backup integrity
Monthly Tasks
Section titled “Monthly Tasks”- Rotate API tokens as needed
- Review RBAC role assignments
- Check for available updates
Emergency Procedures
Section titled “Emergency Procedures”Gateway Unreachable
Section titled “Gateway Unreachable”- Check the health endpoint (a 503 names the failing audit write)
- Verify database connectivity
- Check container/pod status
- Review recent deployments or changes
Suspected Security Incident
Section titled “Suspected Security Incident”- Do not modify audit logs (the database refuses updates and deletes, and the hash chain would show them)
- Check audit log for suspicious activity
- Lock affected users (ending their sessions), and revoke sessions and API tokens
- Contact security team
- Preserve evidence: export the audit log and run
verify-audit
Database Issues
Section titled “Database Issues”- Check database connectivity from gateway
- Verify database is accepting connections
- Check for blocking queries or locks
- Review recent migrations
See Troubleshooting for detailed procedures.