Files
felhom-agent/internal/hub/testdata/host-report.golden.json
T
admin 27b68f043b v0.5.0-rc1: slice 5 Phase A — storage observe/report + watchdog (read-only, live)
Fill the slice-3 storage_targets stub and add the fast-poll storage watchdog.
Read-only this phase; the host-root surface (mounts/SMART/grow/destructive gate)
is Phase B. Hub-owned desired manifest is slice 10, so reconcile against it is
built-but-unfed.

- internal/storage: StorageTarget wire contract, durable_id derivation per type,
  HostReader seam (procfs/sysfs, root-free), Observer (storage_targets from
  ListStorage/NodeStorage + host reads, lvmthin thin-pool fill), and the watchdog
  (third daemon goroutine; debounced out-of-band report on a known target's
  attach/disconnect transition).
- proxmox.Storage: additive parse-only config fields (durable_id sources).
- collector StorageObserver seam; Loop.SetTrigger out-of-band report; daemon runs
  the watchdog as a third goroutine; StorageConfig knobs.
- cross-repo golden kept byte-identical with felhom.eu/hub; bidirectional key-set test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 09:59:05 +02:00

95 lines
2.5 KiB
JSON

{
"host_id": "demo-host-01",
"reported_at": "2026-06-08T12:00:00Z",
"agent_version": "0.3.1",
"host": {
"node": "demo-felhom",
"cpu_percent": 3.2,
"memory_total_bytes": 16777216000,
"memory_used_bytes": 4194304000,
"memory_percent": 25,
"disk_total_bytes": 152000000000,
"disk_used_bytes": 30000000000,
"disk_percent": 19.7,
"loadavg": ["0.10", "0.20", "0.15"],
"uptime_seconds": 86400
},
"guests": [
{
"vmid": 100,
"name": "felhom-cust-acme",
"status": "running",
"controller_version": "",
"spec": { "cores": 2, "memory_bytes": 2147483648, "disk_bytes": 21474836480 }
},
{
"vmid": 101,
"name": "felhom-cust-beta",
"status": "stopped",
"controller_version": ""
}
],
"storage_targets": [
{
"name": "local-lvm",
"type": "lvmthin",
"durable_id": "pve/data",
"state": "attached",
"reachable": true,
"total_bytes": 100000000000,
"used_bytes": 42000000000,
"avail_bytes": 58000000000,
"used_fraction": 0.42,
"content": "rootdir,images",
"mount_path": "",
"backing_device": "",
"class_hint": "fast",
"role": "",
"thin_pool": { "data_used_fraction": 0.42, "metadata_used_fraction": null },
"smart": {
"health": "UNKNOWN",
"temperature_c": null,
"power_on_hours": null,
"reallocated_sectors": null,
"pending_sectors": null,
"offline_uncorrectable": null,
"critical_warning": null,
"media_errors": null,
"percentage_used": null
}
},
{
"name": "usb-backup",
"type": "usb",
"durable_id": "uuid:0fc63daf-8483-4772-8e79-3d69d8477de4",
"state": "attached",
"reachable": true,
"total_bytes": 2000000000000,
"used_bytes": 500000000000,
"avail_bytes": 1500000000000,
"used_fraction": 0.25,
"content": "backup",
"mount_path": "/mnt/usb-backup",
"backing_device": "/dev/sdb1",
"class_hint": "slow",
"role": "",
"smart": {
"health": "UNKNOWN",
"temperature_c": null,
"power_on_hours": null,
"reallocated_sectors": null,
"pending_sectors": null,
"offline_uncorrectable": null,
"critical_warning": null,
"media_errors": null,
"percentage_used": null
}
}
],
"backups": [],
"restore_tests": [],
"pbs_snapshots": [],
"cloudflared": { "status": "active" },
"audit_tail": []
}