medmfc-monitoring
Repository: ckalkav/medmfc-monitoring
Purpose
The central monitoring platform receives node telemetry, stores canonical cycle/event state, performs independent MDS/S3 confirmation, and exposes the operator dashboard.
Repository tree
medmfc-monitoring/
├── .env.example
├── .gitignore
├── README.md
├── docker-compose.yml
│
├── backend/
│ ├── Dockerfile
│ ├── requirements.txt
│ └── app/
│ ├── __init__.py
│ ├── event_log.py
│ ├── main.py
│ ├── s3_monitor.py
│ ├── s3_validator.py
│ └── settings.py
│
├── frontend/
│ ├── Dockerfile
│ ├── index.html
│ └── nginx.conf
│
└── docs/
├── deployment.md
├── event-schema.md
└── status-model.md
Runtime architecture
flowchart LR
AG[HCMR Agent] -->|Authenticated telemetry| API[FastAPI Backend]
API --> DB[(PostgreSQL)]
API --> LOG[(JSONL / Human Logs)]
S3[Public MDS / S3] --> WORKER[S3 Monitor]
WORKER --> API
DB --> API
API --> WEB[Frontend / nginx]
WEB --> OP[Operator]
Current responsibilities
- receive authenticated agent events and state;
- persist canonical event and cycle data in PostgreSQL;
- maintain append-only operational logs;
- expose current-cycle and event APIs;
- perform background MDS/S3 validation;
- promote confirmed cycles to
MDS_CONFIRMED; - expose the dashboard and continuous event log;
- provide the basis for TDT, alerting and duplicate-delivery detection.
Persistent host state
Runtime data lives outside the Git checkout:
/home/nocuser/medmfc-monitoring-data/
├── postgres/
├── logs/
│ ├── app/
│ ├── events/
│ └── human/
├── exports/
├── docs/
├── cache/
└── backup/
Deployment model
The repository is deployed as a Portainer Git stack from the main branch using docker-compose.yml.
Secrets remain in Portainer/environment configuration and are not committed to Git.