elastic / elastic/beats

`system.process` dataset should use device-agnostic field names for cgroupv2 IO metrics

Open
#47,710 1 comment 0 reactions 0 assignees View on GitHub
needs_team
Dominant language
Go
Stars
12.7k
Forks
5k
Avg merge
2d 2h
Merged PRs (30d)
364

Description

**Describe the enhancement:**

The `system.process` dataset currently reports cgroupv2 IO metrics with device-specific field names like `system.process.cgroup.io.stats.dm-0.read.ios`. This makes it hard to query across different devices or when device names change. We should use generic field names like `system.process.cgroup.io.stats.read.ios` with a separate field for the device name.

**Current behavior:**

For cgroupv2 IO metrics, fields are named like:
- `system.process.cgroup.io.stats.dm-0.read.ios`
- `system.process.cgroup.io.stats.dm-0.write.ios`
- `system.process.cgroup.io.stats.nvme0n1.read.ios`
- etc.

This means each device gets its own set of fields, which makes it impossible to:
- Aggregate IO stats across all devices for a process
- Query for IO stats without knowing device names upfront
- Handle cases where device names change

**Proposed behavior:**

Use device-agnostic field names with a separate device identifier field:
- `system.process.cgroup.io.stats.read.ios` (with device name in a separate field)
- `system.process.cgroup.io.stats.write.ios` (with device name in a separate field)
- `system.process.cgroup.io.stats.device` or `system.process.cgroup.io.stats.device_name` (the device name)

**Describe a specific use case for the enhancement or feature:**

Right now, we have to know the device names ahead of time and query each one separately, or write complex queries that enumerate all possible device names. The current implementation is also inconsistent with existing `system` and `linux` `io` datasets.

With device-agnostic fields, we could easily:
- See total IO across all devices for a cgroup
- Handle device name changes without breaking queries
- Aggregate IO metrics in a way that's consistent regardless of the underlying storage setup

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.