Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Document the Kubernetes kinds the history route accepts
rcourtman0b3e8391dd7a
diff --git a/docs/API.md b/docs/API.mdindex d773cfd990..def600fa83 100644--- a/docs/API.md+++ b/docs/API.md@@ -1779,7 +1779,7 @@ Returns stats for the persistent metrics store (SQLite-backed).Returns historical metric series for a resource and time range.Query params:-- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s`, `vm`, `system-container`, `oci-container`, `app-container`, `docker-host`+- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s` (or the Kubernetes kinds `pod`, `k8s-cluster`, `k8s-node`, `k8s-deployment`, which read the same history), `vm`, `system-container`, `oci-container`, `app-container`, `docker-host`- `resourceId` (required)- `metric` (optional): `cpu`, `memory`, `disk`, etc. Omit for all metrics- `range` (optional): `1h`, `6h`, `12h`, `24h`, `1d`, `7d`, `30d`, `90d` (default `24h`; duration strings also accepted)diff --git a/docs/METRICS_HISTORY.md b/docs/METRICS_HISTORY.mdindex 9ec2141047..39d94d5fe7 100644--- a/docs/METRICS_HISTORY.md+++ b/docs/METRICS_HISTORY.md@@ -238,8 +238,10 @@ These endpoints require authentication with the `monitoring:read` scope.`GET /api/metrics-store/history` supports:-- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s`, `vm`,- `system-container`, `oci-container`, `app-container`, or `docker-host`+- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s` (or the+ Kubernetes kinds `pod`, `k8s-cluster`, `k8s-node`, `k8s-deployment`, which read+ the same history), `vm`, `system-container`, `oci-container`, `app-container`,+ or `docker-host`- `resourceId` (required): the source identifier used by that chart, not itsdisplay name (for Proxmox guests this is normally `instance:node:vmid`)- `metric` (optional): `cpu`, `memory`, `disk`, etc. Omit to return all metrics for the resource.diff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex c5fb67d299..935546a20b 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -6822,6 +6822,10 @@ id, which can differ from the canonical id requested.`normalizeMetricsHistoryResourceType` accepts the registry's Kubernetestarget kinds (`pod`, `k8s-cluster`, `k8s-node`, `k8s-deployment`) as the`k8s` store type, so a target passes through unchanged for every caller.+`docs/API.md` and `docs/METRICS_HISTORY.md`, and their published copies under+`frontend-modern/public/docs/`, list those kinds beside `k8s`;+`scripts/tests/test_setup_access_docs.py` pins the documented set to the switch+and `docsLinks.test.ts` pins the published copies to their sources.`/api/agent/resource-capabilities/{id}` is the agent-consumablestructured capability surface for a single resource: the governeddiff --git a/frontend-modern/public/docs/API.md b/frontend-modern/public/docs/API.mdindex d773cfd990..def600fa83 100644--- a/frontend-modern/public/docs/API.md+++ b/frontend-modern/public/docs/API.md@@ -1779,7 +1779,7 @@ Returns stats for the persistent metrics store (SQLite-backed).Returns historical metric series for a resource and time range.Query params:-- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s`, `vm`, `system-container`, `oci-container`, `app-container`, `docker-host`+- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s` (or the Kubernetes kinds `pod`, `k8s-cluster`, `k8s-node`, `k8s-deployment`, which read the same history), `vm`, `system-container`, `oci-container`, `app-container`, `docker-host`- `resourceId` (required)- `metric` (optional): `cpu`, `memory`, `disk`, etc. Omit for all metrics- `range` (optional): `1h`, `6h`, `12h`, `24h`, `1d`, `7d`, `30d`, `90d` (default `24h`; duration strings also accepted)diff --git a/frontend-modern/public/docs/METRICS_HISTORY.md b/frontend-modern/public/docs/METRICS_HISTORY.mdindex 9ec2141047..39d94d5fe7 100644--- a/frontend-modern/public/docs/METRICS_HISTORY.md+++ b/frontend-modern/public/docs/METRICS_HISTORY.md@@ -238,8 +238,10 @@ These endpoints require authentication with the `monitoring:read` scope.`GET /api/metrics-store/history` supports:-- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s`, `vm`,- `system-container`, `oci-container`, `app-container`, or `docker-host`+- `resourceType` (required): `node`, `storage`, `agent`, `disk`, `k8s` (or the+ Kubernetes kinds `pod`, `k8s-cluster`, `k8s-node`, `k8s-deployment`, which read+ the same history), `vm`, `system-container`, `oci-container`, `app-container`,+ or `docker-host`- `resourceId` (required): the source identifier used by that chart, not itsdisplay name (for Proxmox guests this is normally `instance:node:vmid`)- `metric` (optional): `cpu`, `memory`, `disk`, etc. Omit to return all metrics for the resource.diff --git a/frontend-modern/src/utils/__tests__/docsLinks.test.ts b/frontend-modern/src/utils/__tests__/docsLinks.test.tsindex d32f53cccb..b3e0126be1 100644--- a/frontend-modern/src/utils/__tests__/docsLinks.test.ts+++ b/frontend-modern/src/utils/__tests__/docsLinks.test.ts@@ -107,6 +107,16 @@ describe('docsLinks', () => {);});+ it('publishes the API and metrics history references exactly as written', () => {+ // The in-app docs serve these copies; the history route's accepted+ // resourceType list must not differ between the two.+ for (const guide of ['API.md', 'METRICS_HISTORY.md']) {+ expect(readFileSync(path.join(frontendRoot, 'public/docs', guide), 'utf8')).toBe(+ readFileSync(path.join(repoRoot, 'docs', guide), 'utf8'),+ );+ }+ });+it('keeps report collection precautions usable without unpublished documentation links', () => {for (const form of ['bug_report.yml', 'v6_rc_feedback.yml']) {const source = readFileSync(path.join(repoRoot, '.github', 'ISSUE_TEMPLATE', form), 'utf8');diff --git a/scripts/tests/test_setup_access_docs.py b/scripts/tests/test_setup_access_docs.pyindex 96be4d1788..d1aff88dc2 100644--- a/scripts/tests/test_setup_access_docs.py+++ b/scripts/tests/test_setup_access_docs.py@@ -324,11 +324,13 @@ class MetricsAccessDocsHTTPTest(unittest.TestCase):self.assertEqual(len(list((home / ".config/pulse").glob("api-response.*"))), 3)def test_query_types_match_current_handler_and_both_references(self):- expected = {"node", "storage", "agent", "disk", "k8s", "vm", "system-container",- "oci-container", "app-container", "docker-host"}+ expected = {"node", "storage", "agent", "disk", "k8s", "pod", "k8s-cluster", "k8s-node",+ "k8s-deployment", "vm", "system-container", "oci-container", "app-container",+ "docker-host"}handler = (ROOT / "internal/api/router.go").read_text().split("func normalizeMetricsHistoryResourceType(", 1)[1].split("\n}\n", 1)[0]- self.assertEqual(set(re.findall(r'case "([^"]+)":', handler)), expected)+ cases = " ".join(re.findall(r'case ([^:\n]+):', handler))+ self.assertEqual(set(re.findall(r'"([^"]+)"', cases)), expected)for name in ("API", "METRICS_HISTORY"):with self.subTest(guide=name):parameters = guide(name).split("### History" if name == "API" else