Metricbeat's docker.diskio.read/write.rate is always zero when using cgroups v2

We want to use the docker.diskio.read/write.rate metric to monitor our systems. However, Metricbeat's Docker module reports all docker.diskio metrics (except the docker.diskio.read/write.bytes metric) as zero when using a Linux system with cgroups v2.

System Configuration:

  • Metricbeat 8.11.1
  • Docker 24.0.7
  • Ubuntu 22.04

We use the following (slightly truncated) Metricbeat configuration:

metricbeat.modules:
- module: docker
  enabled: true
  period: 60s
  metricsets: [ diskio ]
  hosts: ["unix:///var/run/docker.sock"]
output.console:
  enabled: true
  codec.json:
    pretty: true

Output when using cgroups v1 (as exepcted):

"docker": {
  "diskio": {
    "read": {
      "wait_time": 0,
      "queued": 0,
      "ops": 0,
      "bytes": 0,
      "rate": 0,
      "service_time": 0
    },
    "write": {
      "queued": 0,
      "ops": 14745,
      "bytes": 3867148288,
      "rate": 351.365903663928,
      "service_time": 0,
      "wait_time": 0
    },
    "summary": {
      "service_time": 0,
      "wait_time": 0,
      "queued": 0,
      "ops": 14745,
      "bytes": 3867148288,
      "rate": 351.365903663928
    }
  }
},

Output when using cgroups v2 (rate and ops are always zero which is not expected):

"docker": {
  "diskio": {
    "read": {
      "wait_time": 0,
      "queued": 0,
      "ops": 0,
      "bytes": 0,
      "rate": 0,
      "service_time": 0
    },
    "write": {
      "queued": 0,
      "ops": 0,
      "bytes": 3867148288,
      "rate": 0,
      "service_time": 0,
      "wait_time": 0
    },
    "summary": {
      "service_time": 0,
      "wait_time": 0,
      "queued": 0,
      "ops": 0,
      "bytes": 3867148288,
      "rate": 0
    }
  }
},

Is this a (known) problem, or is this even desired behavior?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.