ecommerce-sre-lab / local demo
Static Preview for a Local-First SRE System

Review the system before you deploy anything.

This page is a static walkthrough for ecommerce-sre-lab. It does not pretend to be live data. Instead, it gives you a fast visual read of the Grafana dashboard, Prometheus surface, exporter endpoints, and the recommended path for local demo review.

Current project state
CI passing
Demo mode
Local only, no cloud required
Review strategy
Entry Points

What to open when the stack is running locally

These are the real URLs exposed by the stack. The static page helps you understand them before you start the services.

Grafana Dashboard

Primary review surface for the system. This is the best main demo entry.

http://localhost:3000/d/ecommerce-overview

Grafana Admin

Management entry for dashboards and configuration checks. Credentials remain local.

admin / ecommerce-admin

Prometheus

Use this to validate scrape status, targets, and alert rule evaluation during local drills.

http://localhost:9090

Metrics

Exporter metrics surface for verifying the Prometheus contract and metric family names.

http://localhost:8000/metrics

State Snapshot

Quick inspection surface for current in-memory order, inventory, and fulfillment state.

http://localhost:8000/state
Architecture

How the local demo moves through the system

The core path is intentionally small: simulators feed exporter metrics, Prometheus scrapes and evaluates rules, and Grafana renders the operations view.

Python Exporter

Hosts `/metrics`, `/state`, `/healthz`, and chaos endpoints for stockout, traffic spike, outage, and restock drills.

Prometheus

Scrapes exporter metrics, loads alert rules, and acts as the metrics source of truth for the lab.

Grafana

Loads the provisioned dashboard and gives you the best “single-screen demo” for the project.

Runbooks

Turn the dashboard and alerts into operations workflow by documenting diagnosis and remediation steps.

Static Preview

Screenshot-style panels for fast visual review

These are intentionally static mock surfaces based on the real dashboard layout and endpoint structure. They are not presented as live screenshots.

Grafana / E-commerce Supply Chain Overview
E-commerce Supply Chain Overview Last 15 minutes · auto refresh 10s
Filters: env=lab Refresh Share
Orders / min Stat
126
+12.4% vs previous window
P95 Latency Stat
24.8s
SLO threshold at 30s
Fulfillment Success Stat
99.1%
Failure ratio stays below alert threshold
Stockout Events Stat
3
Last drill cleared via restock
Order Processing Latency Time series
P95 latency P50 latency
histogram_quantile(0.95, ...) histogram_quantile(0.50, ...)
Inventory Level by SKU Bar gauge
sku-red-shirt
43
sku-blue-hoodie
31
sku-green-cap
9
sku-black-socks
39
Alert State Table
Rule Status Signal Action
HighOrderLatency Normal P95 24.8s Observe dashboard trend
LowInventoryWarning Pending sku-green-cap at 9 Prepare restock drill
FulfillmentOutage Normal Failure ratio 0.9% Review runbook only if spike occurs
Prometheus / Target Health
ecommerce-exporter / up
high_order_latency alert
low_inventory_warning alert
fulfillment_outage alert
Exporter / Metrics Contract
# HELP ecommerce_orders_total Total simulated e-commerce orders by status. # TYPE ecommerce_orders_total counter ecommerce_orders_total{status="completed"} 184 ecommerce_orders_total{status="failed"} 7 ecommerce_inventory_level{sku="sku-red-shirt"} 43 ecommerce_fulfillment_failed_total 2
State / Chaos Drill Flow
POST /chaos/simulate_stockout POST /chaos/restock inventory: sku-red-shirt: 43 orders: pending: 5 processing: 3 fulfillment: outage: false
Walkthrough

How to review the demo locally in the right order

If you want to assess the project quickly, follow the sequence below. It keeps the review practical and close to actual SRE usage.

01 Start the stack

Run Docker Compose from the repository root and wait for Grafana and Prometheus to come up.

02 Open the dashboard first

Use the Grafana dashboard as the main visual review surface. It gives the fastest signal that the system is healthy.

03 Verify metrics and state

Check `/metrics` for naming and structure, then `/state` for current simulator state.

04 Run a chaos drill

Trigger stockout, traffic spike, or outage and watch how the dashboard and alerts respond.

$ docker compose up --build $ open http://localhost:3000/d/ecommerce-overview $ open http://localhost:9090 $ open http://localhost:8000/metrics $ open http://localhost:8000/state $ curl -X POST http://localhost:8000/chaos/simulate_stockout \ -H "Content-Type: application/json" \ -d '{"sku_id":"sku-red-shirt"}'
README Upgrade

What the repository documentation should now communicate

The repository should make the path obvious: first open the static preview, then run the local system, then capture screenshots from the real stack.

Static preview first

Point users to `docs/index.html` or a local static preview URL so they can understand the system before running Docker.

Screenshot checklist

Ask for four repository screenshots after local startup: dashboard overview, Prometheus targets, metrics endpoint, and state snapshot.

Clear local entry points

Keep all localhost URLs together in one section so the project feels immediately runnable and easy to review.

Honest scope statement

Make it clear what is static preview content and what is live runtime content, so the repo stays trustworthy.