How to: Architecture
```
┌───────────────────┐
│  Metrics Server   │──┐
│  (CPU/Memory)     │  │    ┌──────────────────────────────────────┐
└───────────────────┘  ├───>│         kube-opex-analytics          │
┌───────────────────┐  │    │  ┌─────────┐  ┌────────┐  ┌─────────┐│
│  DCGM Exporter    │──┘    │  │ Poller  │─>│RRD DBs │─>│ API     ││
│  (GPU metrics)    │       │  │ (5 min) │  │        │  │         ││
└───────────────────┘       │  └─────────┘  └────────┘  └────┬────┘│
                            └───────────────────────────────┼──────┘
                                                            │
                            ┌───────────────────────────────┼──────┐
                            │                               v      │
                            │  ┌────────────┐    ┌────────────┐    │
                            │  │  Web UI    │    │  /metrics  │    │
                            │  │  (D3.js)   │    │ (Prometheus│    │
                            │  └────────────┘    └────────────┘    │
                            └──────────────────────────────────────┘
                                     │                  │
                                     v                  v
                              Built-in Dashboards   Grafana/Alerting
```

**Data Flow:**
1. Metrics polled every 5 minutes (configurable):
   - CPU/Memory from Kubernetes Metrics Server
   - GPU from NVIDIA DCGM Exporter
2. Metrics are processed and stored in internal lightweight time-series databases (round-robin DBs)
3. Data is consolidated into hourly, daily, and monthly aggregates
4. API serves data to the built-in web UI and Prometheus scraper