docs: add Prometheus inventory export script for diagram/documentation pipeline

This commit is contained in:
beatz174-bit
2026-04-13 16:29:10 +10:00
parent 7646f8187b
commit c0ed8cfc5f
4 changed files with 530 additions and 0 deletions
+6
View File
@@ -95,6 +95,12 @@ Prometheus scrape targets indicate additional infrastructure outside the local C
- `nix-cache`
- `kuma.lan.ddnsgeek.com`
## Runtime Inventory Input
Prometheus runtime inventory snapshots are exported with `scripts/export_prometheus_inventory.py` and committed under `docs/runtime/`. The latest human-readable summary is in [docs/prometheus-inventory.md](prometheus-inventory.md).
These artifacts are an observed-runtime input for architecture diagrams/docs and should be combined with repository configuration, not treated as sole source of truth.
## Assumptions / Unknowns
The repository provides enough detail to infer **container-level architecture**, but not full **Proxmox host/VM topology**.
+38
View File
@@ -0,0 +1,38 @@
# Prometheus Runtime Inventory
This document is generated by `scripts/export_prometheus_inventory.py` from Prometheus runtime data. Commit the generated update whenever architecture/runtime inventory changes.
## Usage
Required:
- `PROMETHEUS_URL`
Optional:
- `PROMETHEUS_TIMEOUT` (default: `10` seconds)
- `PROMETHEUS_BEARER_TOKEN`
- `PROMETHEUS_USERNAME`
- `PROMETHEUS_PASSWORD`
- `PROMETHEUS_VERIFY_TLS` (default: `true`)
Run:
```bash
export PROMETHEUS_URL="https://prometheus.example.com"
python3 scripts/export_prometheus_inventory.py --output-dir docs/runtime
```
## Outputs
- Raw API snapshots: `docs/runtime/prometheus-targets.json`, query result snapshots, and optional label-query snapshots.
- Normalized inventory: `docs/runtime/prometheus-inventory.json`
- Human summary: `docs/prometheus-inventory.md` (this file)
## Diagram/Docs pipeline note
Treat Prometheus data as observed runtime telemetry. Do not infer placement/topology/network boundaries unless labels or other repo sources explicitly provide that information.
## Status
Inventory has not been generated in this environment because no `PROMETHEUS_URL` was provided for execution.