feat(fleet): enrich host_info_json (chip, hostname, boot time, pid, disks, LAN IPs) - #457
feat(fleet): enrich host_info_json (chip, hostname, boot time, pid, disks, LAN IPs)#457PeronGH wants to merge 3 commits into
Conversation
…, disks Descriptive-only additions to the agent's `host_info_json` — decision inputs still live in HostTelemetry. Adds cpu_model, hostname, boot_time_unix, agent_pid, and a static disks list (name/mount/fs/total_bytes; no live free-space, which would be a placement input).
|
The check suite failed on the
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — enriches the fleet agent's free-form host_info_json blob with descriptive host facts, verified for API correctness, call-site cost, and dependency availability.
- Add descriptive host facts to
host_info_json—cpu_model(first CPU brand afterrefresh_cpu_all), nullablehostname,boot_time_unix,agent_pid, and a staticdisksarray (name/mount_point/file_system/total_bytes). - Descriptive-only split preserved — no placement-influencing signals added here; live decision inputs stay in
HostTelemetry, matching the updated doc comment. - No wire change —
host_info_jsonremains a free-form string; no.protoedit, no protobuf-breaking migration.
Notes from the review, none blocking:
host_info_json()is invoked only atenroll.rs:79andattach.rs:356, and theattach.rscomment confirms host facts are constant for the process lifetime (sent once per connection, not per heartbeat), so the freshSystem::new()+ CPU/disk refresh is not a hot-path cost.- The
sysinfo0.33 API usage (refresh_cpu_all,Disks::new_with_refreshed_list,Cpu::brand, theDiskaccessors, and the staticSystem::{name,long_os_version,kernel_version,boot_time}calls) is correct, andhostname/sysinfo/serde_jsonare all already declared dependencies. - The
hostnamefield falls back tonullhere while the top-levelmachine_name()falls back to"unknown"— an intentional and harmless difference (JSONnullis the honest representation of "couldn't determine").
Claude Opus | 𝕏
Enumerate all non-loopback, non-unspecified IPs across every interface (both v4 and v6), grouped by interface with prefix length. Closes the LAN-IP part of RUN-42.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — since the prior pullfrog approval at 4e226657, the delta is a rustfmt tweak plus a new lan_ips field added to the fleet agent's free-form host_info_json blob.
- Add
lan_ips[]tohost_info_json— enumerates every non-loopback, non-unspecified IP across all interfaces viasysinfo::Networks::new_with_refreshed_list(), emittinginterface/ip/prefixfor both v4 and v6. - rustfmt on hostname assignment — no behavior change (
74451dca).
Notes from the review, none blocking:
sysinfo = "0.33"is pulled with default features, which includenetwork, soNetworksandNetworkData::ip_networks()compile;IpNetworkexposes publicaddr: IpAddrandprefix: u8in 0.33, so the field usage is correct.- The
!is_loopback() && !is_unspecified()filter matches the described intent. IPv6 link-local (fe80::) addresses are included since they are neither loopback nor unspecified — intentional per the PR description ("both v4 and v6") and harmless for descriptive-only telemetry. - Consistent with the rest of the function: no wire/proto change, still a free-form string sent once per connection attempt (not per heartbeat), so no hot-path cost.
Claude Opus | 𝕏

Closes RUN-42
(all three asks — chip as
cpu_model, disk capacity asdisks[].total_bytes, LAN IP aslan_ips[]).Summary
host_info_jsonin the fleet agent's enroll/attach payloads:cpu_model— CPU brand stringhostname— kernel hostname (distinct frommachine_name)boot_time_unix/agent_pid— diagnostic anchorsdisks[]— static disk list (name,mount_point,file_system,total_bytes; no live free-space)lan_ips[]— every non-loopback, non-unspecified IP across all interfaces (interface,ip,prefix; both v4 and v6)HostTelemetry(live memory / load / cpu count). Deliberately omitsavailable_space, FD counts, and other live-load signals for the same reason.host_info_jsonis a free-form string; no.protochange, no protobuf-breaking migration.Test plan
cargo check -p arcbox-fleet-agentcargo clippy -p arcbox-fleet-agent --all-targets -- -D warningscargo test -p arcbox-fleet-agent host::(9 pass — existing capability-mapping tests unaffected)lan_ipson a multi-NIC host)