CHM is an internal monitoring backend for data engineering teams to track client pipelines, ingest run events idempotently, and provide dashboard-ready operational health views for business and governance reporting.
Data engineers need a reliable system to monitor customer data pipelines across clients, detect failures quickly, and review historical reliability trends. CHM provides a canonical data model, ingestion flow, and analytics outputs so teams can answer what is failing now, what changed recently, and which pipelines are unstable.
- Q1-Q5 (Business Monitoring): visibility into failures over time, latest status by client/pipeline, and trend summaries that support stakeholder reporting.
- Q6-Q10 (Operations and Governance): operational triage views, flaky pipeline ranking, platform-level failure rates, and governance-friendly documented workflows.
- Hard constraints:
- Exactly four domain entities in MVP (
clients,pipelines,runs,alert_rules). - Idempotent ingestion keyed by
(pipeline_id, external_run_id). - Consistent, dashboard-ready query outputs for Grafana and Metabase.
- Exactly four domain entities in MVP (
clients: customer/account scope.pipelines: pipeline definitions owned by one client.runs: time-based run history events linked to pipelines.alert_rules: stored alert definitions scoped to client/pipeline.
Key relationships and invariants:
pipelines.client_id -> clients.idruns.pipeline_id -> pipelines.idalert_rules.client_id/pipeline_idreference client/pipeline scope- idempotent ingestion identity: unique
(pipeline_id, external_run_id)
- API: FastAPI
- ORM/Migrations: SQLAlchemy 2.x + Alembic
- Validation: Pydantic v2
- Database: PostgreSQL 15
- Dashboards: Grafana + Metabase
- Language/runtime: Python 3.11
Project layout:
app/ # API, services, db, ingestion, synthetic orchestrator
tests/ # unit, integration, contract tests
docker/ # postgres/grafana/metabase compose + provisioning
data/ # synthetic dataset artifacts
docs/ # workflow, validation, and prompt/playbook docs
cd /Volumes/T7/CHM
python3.11 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"docker compose -f /Volumes/T7/CHM/docker/docker-compose.yml up -dNotes:
- Postgres is exposed on host
55432and runs internally on5432. - Metabase app database is
metabase_app. - Grafana dashboards/datasources are provisioned from
docker/grafana/provisioning/.
cd /Volumes/T7/CHM
alembic upgrade head
ruff check .
pytest
docker compose -f /Volumes/T7/CHM/docker/docker-compose.yml configSynthetic dataset artifacts live under:
/Volumes/T7/CHM/data/synthetic/v1/base//Volumes/T7/CHM/data/synthetic/v1/batches//Volumes/T7/CHM/data/synthetic/v1/context/
Orchestrator entrypoint:
chm-synthetic-orchestrator --state-file /Volumes/T7/CHM/data/synthetic/v1/context/session_state.jsonRelated workflow docs:
/Volumes/T7/CHM/docs/synthetic-data-playbook.md/Volumes/T7/CHM/docs/synthetic-orchestrator-prompt.md/Volumes/T7/CHM/docs/synthetic-subagent-prompts.md
Q1-Q5 Business Monitoring:
Q6-Q10 Operations & Governance:
This repository follows issue-linked PR delivery:
- one issue per task
- branch from
main, target PR basemain - include
Closes #<issue-number>in PR body
Reference:
/Volumes/T7/CHM/docs/project-management/pr-workflow.md
- CHM schema-first backend with four core entities
- Idempotent ingestion flow and tests
- Dashboard query contracts and Grafana provisioning
- Synthetic dataset pack (
v1) with validation report - Dashboard screenshots captured in
artifacts/ - Final project documentation and workflow guidance

