Student Name: Bhavya Jain
Registration No: 23FE10CSE00831
Course: CSE3253 DevOps [PE6]
Semester: VI (2025–2026)
Project Type: Puppet / Monitoring
Difficulty: Intermediate
The Golden Signal Dashboard is a Python Streamlit application that visualizes the four SRE golden signals—latency, traffic, errors, and saturation—from live Prometheus metrics or reproducible CSV sample data. It is designed for academic submission under the Puppet / Monitoring category and includes Docker, automated tests, GitHub Actions CI, and minimal Puppet manifests for configuration alignment.
Operators and developers often struggle to interpret scattered metrics. This project provides a single, lightweight dashboard that queries or loads service-wise time series, applies clear thresholds, and surfaces Healthy / Warning / Critical health states alongside interactive charts.
- Visualize latency, traffic, errors, and saturation with charts, summary cards, and threshold-based health states
- Provide reproducible sample data, automated tests, and GitHub Actions CI
- Align with the Puppet / Monitoring category using Docker, documentation, and Puppet configuration samples
Feature 1 — Interactive Plotly line charts for latency, traffic, errors, and saturation, with warning/critical reference lines where applicable.
Feature 2 — Sidebar filters for services and time window, plus per-service health derived from thresholds.
Feature 3 — Reproducible sample data via utils/generate_sample_data.py, pytest checks, and a GitHub Actions workflow.
Feature 4 — Strict CSV schema and range validation with clear UI errors, plus an optional DASHBOARD_DATA_PATH override for external datasets.
Feature 5 — Live Prometheus range queries, automatic dashboard refresh, and a self-contained metrics exporter for local demonstrations.
Programming Language: Python
Framework: Streamlit
Metrics storage: Prometheus TSDB (live mode) or CSV fallback
Version Control: Git
CI/CD: GitHub Actions
Containerization: Docker
Orchestration: Kubernetes (not used in this submission)
Configuration Management: Puppet (sample manifests and EPP template)
Monitoring: Prometheus, PromQL, and application-level golden-signal dashboard
- Docker Desktop v20.10+ (recommended)
- Git 2.30+
- Python 3.11+ (for local runs without Docker)
- Clone the repository:
git clone https://github.com/bhavyajain0810/devopsprojectgoldensignaldashboard.git
cd devopsprojectgoldensignaldashboard- Start the complete live monitoring stack:
docker compose up --buildThis starts the live metrics exporter, Prometheus, and Streamlit dashboard. For CSV-only mode, build and run just the dashboard image:
docker build -t devopsprojectgoldensignaldashboard:latest .
docker run --rm -p 8501:8501 devopsprojectgoldensignaldashboard:latest- Access the application:
Web Interface: http://localhost:8501
Prometheus Interface: http://localhost:9090
cd devopsprojectgoldensignaldashboard
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Linux/macOS:
# source .venv/bin/activate
pip install -r requirements.txt
streamlit run app.pyFor development and tests, install requirements-dev.txt instead.
Open http://localhost:8501. If data/sample_metrics.csv is missing, run:
python utils/generate_sample_data.pydevopsprojectgoldensignaldashboard/
├── README.md
├── app.py
├── metrics.py
├── prometheus_source.py
├── requirements.txt
├── requirements-dev.txt
├── Dockerfile
├── docker-compose.yml
├── .dockerignore
├── .gitignore
├── LICENSE
├── data/
│ └── sample_metrics.csv
├── monitoring/
│ ├── exporter.py
│ └── prometheus.yml
├── utils/
│ └── generate_sample_data.py
├── tests/
│ ├── test_app.py
│ ├── test_metrics_file.py
│ └── test_prometheus_source.py
├── docs/
│ ├── architecture.md
│ ├── implementation.md
│ └── project_report.md
├── .github/
│ └── workflows/
│ └── ci.yml
├── .devcontainer/
│ └── devcontainer.json
├── screenshots/
│ └── dashboard.png
└── puppet/
├── manifests/
│ └── init.pp
└── templates/
└── dashboard.conf.epp
The default source is CSV. Select Prometheus and configure its endpoint with:
$env:METRICS_SOURCE = "prometheus"
$env:PROMETHEUS_URL = "http://localhost:9090"
streamlit run app.pyMETRICS_SOURCE=prometheus PROMETHEUS_URL=http://localhost:9090 streamlit run app.pyOptional settings include PROMETHEUS_LOOKBACK_MINUTES,
PROMETHEUS_STEP_SECONDS, PROMETHEUS_TIMEOUT_SECONDS,
DASHBOARD_REFRESH_SECONDS, and the four PROMETHEUS_*_QUERY overrides.
DASHBOARD_DATA_PATH still selects a different CSV file in CSV mode.
app.py— Streamlit dashboard entrypointmetrics.py— Shared data validation and health logicprometheus_source.py— Prometheus HTTP API and PromQL adaptermonitoring/prometheus.yml— Prometheus scrape configurationmonitoring/exporter.py— Live demonstration metrics targetdata/sample_metrics.csv— Offline fallback metricsDockerfile— Non-root application image
- Checkout — Clone repository on GitHub-hosted runner
- Setup Python — Python 3.11
- Install dependencies —
pip install -r requirements-dev.txt - Test —
pytest tests/ -v - Container Build — Build the Docker image to catch packaging regressions
- Compose Validation — Validate the three-service monitoring stack
- Security Scan — Not configured in this submission (future scope: e.g. Trivy on image)
- Deploy — Not configured in this submission (manual/local Docker only)
Unit Tests: pytest (python -m pytest tests/ -v)
Integration Tests: Streamlit render smoke test
E2E Tests: Not included
Coverage reporting is not configured; the suite covers sample-data compatibility, validation failures, environment configuration, and health-threshold boundaries.
Dashboard: Streamlit UI querying Prometheus or reading the CSV fallback. Custom metrics: A live exporter exposes per-service counters, histograms, and CPU gauges. Prometheus: Scrapes the exporter every five seconds and retains local data for 24 hours. Alerts: Not implemented (thresholds are visual only in the UI).
docker compose up --buildOpen the dashboard at http://localhost:8501 and Prometheus at
http://localhost:9090. Stop the stack with docker compose down.
# Build image
docker build -t devopsprojectgoldensignaldashboard:latest .
# Run container
docker run --rm -p 8501:8501 devopsprojectgoldensignaldashboard:latestThe hosted demo uses CSV fallback because it cannot reach Prometheus running on your local Docker network.
Prometheus API integration is documented in the Implementation Guide.
Architecture Overview
Implementation Guide
Docker, CI, and Puppet notes: Implementation Guide
Troubleshooting: Implementation Guide — Troubleshooting
main
├── develop
│ ├── feature/latency-charts
│ ├── feature/puppet-config
│ └── fix/csv-validation
└── release/v1.0.0
feat:New featurefix:Bug fixdocs:Documentationtest:Test-relatedrefactor:Code refactoringchore:Maintenance tasks
- Input validation and sanitization (required schema, timestamps, numeric types, bounds, and service names)
- Authentication and authorization (not in scope)
- Environment-based data-source configuration
- Non-root container runtime
- Regular dependency updates (recommended practice for maintainers)
- Security headers in web applications (reverse-proxy concern for production)
# Example (not run in CI for this submission):
# trivy image devopsprojectgoldensignaldashboard:latest- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License — see the LICENSE file for details.
- Balancing template breadth vs. repo simplicity — The course template describes a large multi-folder layout; this submission uses the prescribed flat academic tree while keeping README sections aligned with the template.
- Health logic vs. traffic — Traffic spikes are not automatically unhealthy; health emphasizes latency, errors, and saturation.
- Puppet without a full control repo — Manifests are minimal and documented so they can be relocated into a proper module path when used with a real Puppet server.
- Golden signals provide a compact mental model for service health.
- Container images make grading and demos repeatable across machines.
- A pluggable metrics source keeps live monitoring and deterministic tests compatible.
Course Instructor: Mr. Jay Shankar Sharma
Reference materials and tutorials
Open-source tools and libraries
Student: Bhavya Jain GitHub: bhavyajain0810 Course Coordinator: Mr. Jay Shankar Sharma Consultation Hours: Thursday & Friday, 5–6 PM, LHC 308F