PythonDockerPrometheusGrafanaNginxMySQL

Architecture

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.


Services
Flask
Web Application
REST API instrumented with Prometheus metrics. Exposes /metrics endpoint tracking HTTP request counts and latency per endpoint.
Prometheus
Metrics Collection
Scrapes the Flask /metrics endpoint on schedule. Stores time-series data and provides the PromQL query engine for Grafana.
Grafana
Visualization
Pre-provisioned dashboards showing total requests, requests per second, average response time, and breakdown by endpoint. No manual setup required.
Nginx
Reverse Proxy
Handles all external HTTP routing to the Flask application.
MySQL
Persistent Storage
Application data stored in a named Docker volume, persisting across container restarts and rebuilds.

Key Features

Why I Built It

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, is significantly more effective than one who just consumes dashboards without understanding what is underneath them.

This stack also demonstrates that my interests extend beyond pure security tooling into the infrastructure and observability layer that security operations depend on.