Skip to content

[Agent] Implement system I/O collector (Network & Disk) #13

@varev-dev

Description

@varev-dev

Goal

Implement an agent collector that gathers network and disk I/O metrics on Linux at configurable intervals and publishes them through the existing metric pipeline.

Acceptance criteria

  • Collector starts with the agent and can be enabled in default official plugin set.
  • Emitted metrics include (or equivalent): network.bytes.sent/received, network.packets.sent/received, network.errors.in/out.
  • Emitted metrics include: disk.bytes.read/written, disk.ops.read/write.
  • disk.utilization.percent is emitted (if available from source data).
  • Collector handles missing/unavailable files gracefully (no agent crash; warning log + continue).
  • Metric units are consistent and documented (bytes, ops, percent, per_second where applicable).

Sub-tasks & Scope of work

  • Data Acquisition: Create collector module reading from /proc/net/dev and /proc/diskstats with robust parsing and clear error handling.
  • Rate Computation: Compute rate metrics from monotonic counters between sampling ticks (delta/time).
  • Labeling: Add low-cardinality labels (interface, device); skip loopback/virtual devices by default.
  • Pipeline Integration: Integrate with ring buffer write path and ensure compatibility with variable collector intervals. Expose metrics in both push stream and local /metrics shim output.
  • Testing: Write unit tests for parsing + rate calculations, and integration tests for collector registration/output shape.
  • Documentation: Add short docs describing metric names, labels, units, known Linux limitations, and example config snippet.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions