Docker Monitoring Stack
A fully containerized observability stack built with Docker Compose, demonstrating real-time monitoring of a Flask application using Prometheus for metrics collection and Grafana for visualization. Production-style architecture from a single config file.
Five services running together via Docker Compose, each with a single responsibility. The Flask app exposes a /metrics endpoint that Prometheus scrapes on a schedule. Grafana connects to Prometheus as a data source and loads pre-provisioned dashboards automatically at startup. Nginx sits in front of Flask handling all external HTTP routing. MySQL provides persistent storage for application data.
No manual dashboard setup required — everything provisions itself from config files on first boot. One command brings the entire stack up.
|
Nginx # reverse proxy
|
Flask App # handles request, increments counters
| |
MySQL Prometheus # scrapes /metrics
|
Grafana # visualizes metrics in real time
- ► Fully containerized — no local installs required beyond Docker
- ► Infrastructure-as-code with Docker Compose
- ► Automated Grafana provisioning from config files
- ► Real-time observability pipeline
- ► Persistent storage via named volumes
- ► Production-style service separation
- ► Single command deployment: docker-compose up -d --build
rate(requests[1m]) # requests per second
avg(response_latency) # average response time
requests_by_endpoint # breakdown per route
Observability is a core part of both DevOps and security operations. A SOC analyst who understands how metrics pipelines work — how Prometheus scrapes targets, how Grafana queries time-series data, how dashboards surface anomalies — is significantly more effective than one who just consumes dashboards without understanding what is underneath them.
Using Docker Compose to orchestrate all five services also reflects how modern infrastructure actually works. Understanding container networking, volume persistence, and service dependencies from first principles is more valuable than following a tutorial. Every configuration file in this project was written and understood, not copied.
This stack also demonstrates that my interests extend beyond pure security tooling into the infrastructure and observability layer that security operations depend on.