The challenge
Production systems needed clearer visibility into component health, so problems in applications, databases or logs were noticed and acted on.
Constraints
- Signals came from different places: logs, servers and databases.
- Alerts must reach someone who will act, at any hour, without flooding everyone.
Options and trade-offs
Relying on separate tools per component leaves gaps between them. A dedicated monitoring service gives one place to define health checks, at the cost of running and maintaining another service.
What I did
I personally designed and built a microservice that monitored applications, databases and logs and raised alerts for unhealthy components.
The solution
The service watches application logs, EC2 CPU and memory, database sessions, locks and latency, and raises an alert when a signal crosses its threshold. Wider observability work also used Grafana, CloudWatch and PagerDuty; these were not all part of this tool.
Incident workflow and escalation
Alerts go first to technical support. If not resolved, they escalate in order to the team leads, the engineering manager, the CTO and finally the CEO. Each level is reached by notification, message and phone call, so a serious incident cannot stay unseen.
- Signal: a threshold is crossed.
- Alert: technical support is notified.
- Escalation: leads, then manager, then CTO, then CEO, until someone acts.
Outcome
A mechanism for detecting and reporting unhealthy components. No measured detection-time improvement is claimed.
Lessons
- Monitor what customers feel, not only what servers report.
- Every alert should have an owner and an action.