Skip to content

Feature request: Metrics.network for NIC throughput (parity with Metrics.cpu / .memory) #2013

Description

Context

Third-party clients building network-inventory or monitoring views can today retrieve full static NIC configuration via info.networkInterfaces (IPs, gateway, DHCP, IPv6, status) and hardware metadata via info.devices.network (vendor, model, speed, virtual-flag). What's missing is the dynamic side — live throughput counters that would let clients render bandwidth graphs or per-interface activity indicators.

Existing pattern that fits perfectly

The schema already exposes live system stats via Metrics, with both query and subscription surfaces:

type Metrics {
    cpu: CpuUtilization              # live CPU load (percentTotal + per-core)
    memory: MemoryUtilization        # live RAM (used/free/available/swap/percent)
    temperature: TemperatureMetrics
}

type Subscription {
    systemMetricsCpu: CpuUtilization!
    systemMetricsMemory: MemoryUtilization!
    systemMetricsTemperature: TemperatureMetrics
}

Network is the obvious sibling that should fit right alongside — same shape, same access pattern, same subscription cadence. The data is already trivially available on the host (/proc/net/dev, /sys/class/net/<iface>/statistics/*).

Proposal

type Metrics {
    # … existing fields
    network: NetworkUtilization
}

type NetworkUtilization implements Node {
    id: PrefixedID!
    interfaces: [NetworkInterfaceStats!]!
}

type NetworkInterfaceStats implements Node {
    id: PrefixedID!
    iface: String!
    rxBytes: BigInt!
    txBytes: BigInt!
    rxPackets: BigInt!
    txPackets: BigInt!
    rxErrors: BigInt!
    txErrors: BigInt!
    rxDropped: BigInt!
    txDropped: BigInt!
    carrier: Boolean
    mtu: Int
}

type Subscription {
    # … existing
    systemMetricsNetwork: NetworkUtilization!
}

Why this matters

CPU, memory, and temperature already stream live to clients; network is the conspicuous gap. Adding it lets dashboards/mobile clients show real-time per-interface throughput without falling back to SSH-based scraping of /proc/net/dev, and slots into the existing Metrics consumer code path on the client side with near-zero new abstractions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions