Problem
Dashboards require someone watching them. Alerts notify the team when something goes wrong — before customers notice.
Proposed solution
Prometheus alerting rules (exported to Alertmanager or Grafana Alerts):
- DLQ growth:
meterplex_dead_letter_total increases by >10 in 5 minutes → warning
- Consumer lag:
meterplex_kafka_consumer_lag > 1000 for >5 minutes → warning
- Outbox backlog:
meterplex_outbox_pending_count > 500 for >5 minutes → critical
- Invoice generation failure:
meterplex_invoices_generated_total{status="failed"} increases → critical
- Payment failure spike:
meterplex_payments_total{status="failed"} rate > 20% of total → warning
- API error rate:
http_requests_total{status=~"5.."} rate > 1% → warning
- Auth brute force:
http_requests_total{path="/api/v1/auth/login",status="401"} rate > 50/min → critical
- Entitlement check latency:
meterplex_entitlement_check_duration_seconds p99 > 100ms → warning
API design (if applicable)
N/A — Prometheus/Grafana alerting configuration files.
Alternatives considered
- Application-level alerting — rejected. Monitoring infrastructure should handle alerting, not the application.
- PagerDuty integration — future enhancement. Start with Slack/email notifications.
Additional context
Alert rules stored in prometheus/alerts/ directory, version-controlled alongside the application.
Problem
Dashboards require someone watching them. Alerts notify the team when something goes wrong — before customers notice.
Proposed solution
Prometheus alerting rules (exported to Alertmanager or Grafana Alerts):
meterplex_dead_letter_totalincreases by >10 in 5 minutes → warningmeterplex_kafka_consumer_lag > 1000for >5 minutes → warningmeterplex_outbox_pending_count > 500for >5 minutes → criticalmeterplex_invoices_generated_total{status="failed"}increases → criticalmeterplex_payments_total{status="failed"}rate > 20% of total → warninghttp_requests_total{status=~"5.."}rate > 1% → warninghttp_requests_total{path="/api/v1/auth/login",status="401"}rate > 50/min → criticalmeterplex_entitlement_check_duration_secondsp99 > 100ms → warningAPI design (if applicable)
N/A — Prometheus/Grafana alerting configuration files.
Alternatives considered
Additional context
Alert rules stored in
prometheus/alerts/directory, version-controlled alongside the application.