ShowMerit

Splunk OTel Collector 0.165: Keep disk_ops.total Charts, Same Numbers

On one EKS node, the release note's system.disk.operations query matched disk_ops.total to the operation in three Splunk OTel Collector 0.164.0 windows and carried on through 0.165.1; it counts partitions too, and a device filter gives one disk's own operations.

Abhimanyu BajajPublished 2 Dec 20265 min readTested in eu-central-1Lab codeLab evidence

Run this yourself

On your AWS account

The full lab with your own AWS account and Splunk token. Follow the steps in this article, then run its clean up step so nothing keeps running.

git clone https://github.com/Abhimanyu9988/showmerit.git
cd showmerit/labs/splunk-otel-collector-0-165-keep-disk-ops-total-charts-same

Moving a disk_ops.total chart to the Splunk OTel Collector's system.disk.operations kept its numbers exactly: the release note's SignalFlow query matched disk_ops.total to the operation in all three 0.164.0 windows where both were sent (75,640, 72,268 and 84,148), and it carried straight on after the upgrade to 0.165.1. So you can move charts before you upgrade.

The query adds up every device, and the disk's partitions are devices too: in the first run the kernel counted 37,559 operations on nvme0n1 and exactly twice that, 75,118, across every device line. Adding filter('device', 'nvme0n1') gave the disk's own count, within 0.7% of the kernel in five of six runs. On this node (one NVMe disk, the writes on one of its partitions) the filtered query read about half the old values, so if you switch a chart to the filtered query, rescale its thresholds; the unfiltered query needs no change.

TL;DR

How I compared the two versions

system.disk.operations has one series per device and direction (the list Splunk returned is below). Splunk OTel Collector 0.164.0 also sent disk_ops.total; 0.165 no longer sends it by default.

On EKS 1.34 with two t3.large nodes, I installed the Splunk OTel Collector chart 0.164.0 (agent 0.164.0), ran three runs, then ran helm upgrade on the same release to chart 0.165.0 (agent 0.165.1) and ran three more. One values file served both, pinning host metrics to 10 s, because chart 0.165.0 alone collects every minute by default. The chart version was the only change.

Each run, on one node: a pod read /proc/diskstats (the kernel's per-device table), waited 20 s, wrote 4 KiB blocks with O_DIRECT for 40 s, waited 30 s and read it again. Then I read Splunk for that node over exactly that 90 s window.

Six runs side by side: 75,640 on the query, 37,559 on the disk

The first 0.164 run, as the lab printed it:

node A /proc/diskstats reads+writes: 75118 on every device line, 37559 on non-partition devices, 37559 on nvme0n1 alone; ...
disk_ops.total: 9 points over 1 series, sum 75640
system.disk.operations delta .sum(by=['host.name']): 9 points over 8 series (device x direction), sum 75640; device nvme0n1 only: 37820

All six runs, in operations over each run's window:

Run Agent disk_ops.total Release note's query Kernel, every device line Query, nvme0n1 only Kernel, nvme0n1 dd writes
v164-1 0.164.0 75,640 75,640 75,118 37,820 37,559 37,376
v164-2 0.164.0 72,268 72,268 71,754 36,134 35,877 35,840
v164-3 0.164.0 84,148 84,148 83,622 42,074 41,811 41,728
v165-1 0.165.1 no points 88,122 84,232 44,061 42,116 41,984
v165-2 0.165.1 no points 81,498 80,972 40,749 40,486 40,448
v165-3 0.165.1 no points 83,034 82,512 41,517 41,256 41,216

With 0.165.1, Splunk held no disk_ops.total point for the node in any of the three windows, and the query carried straight on through the upgrade. The first window after the rollout, v165-1, read 4.6% above the kernel on nvme0n1, against 0.6% to 0.7% in the other five runs.

Splunk chart for node A across all six runs: disk_ops.total (grey columns) sits under the release note's query (orange line) on 0.164.0, then only the query arrives on 0.165.1

Partitions are devices too

At the end, the lab listed the node's system.disk.operations series as Splunk holds them:

node A system.disk.operations series in Splunk (device/direction): nvme0n1/read nvme0n1/write nvme0n1p1/read nvme0n1p1/write nvme0n1p127/read nvme0n1p127/write nvme0n1p128/read nvme0n1p128/write

The disk nvme0n1 and its partitions nvme0n1p1, nvme0n1p127 and nvme0n1p128 each have their own series, and the query adds them all up. The kernel's table shows what that does: in every run, the count over every device line is exactly twice the count on nvme0n1 alone (75,118 and 37,559 in the first), so each write was counted on the disk and again on one of its partitions. disk_ops.total gave the same sum, which is why a chart keeps its scale when it moves to the query.

Two queries for two questions

As the lab ran them, for one node:

data('system.disk.operations', filter=filter('k8s.cluster.name', '<cluster>') and filter('k8s.node.name', '<node>'), rollup='delta').sum(by=['host.name'])
data('system.disk.operations', filter=filter('k8s.cluster.name', '<cluster>') and filter('k8s.node.name', '<node>') and filter('device', 'nvme0n1'), rollup='delta').sum(by=['host.name'])

The one-disk query read 0.6% to 0.7% above the kernel in five runs, 257 to 263 operations each time. A likely cause is the 256 test writes the lab makes just before each window opens, which the first 10 s point can include; I didn't isolate it. For v165-1, the lab didn't record what ran on the node just before that window, right after the upgrade.

Device names depend on the instance, so check your series list first.

Keep 10 s points through the upgrade

Chart 0.165.0 collects host metrics every minute by default. If your charts expect 10 s points, this is the setting from the lab's values.yaml, the same file for both charts; the agents' rendered ConfigMaps read 10s with each:

agent:
  config:
    receivers:
      host_metrics:
        collection_interval: 10s

Try it yourself

git clone https://github.com/Abhimanyu9988/showmerit
cd showmerit/labs/splunk-otel-collector-0-165-keep-disk-ops-total-charts-same
export SPLUNK_REALM=us1 SPLUNK_ACCESS_TOKEN=... SPLUNK_API_TOKEN=...
export LAB_NAME=disk-lab AWS_REGION=eu-central-1
terraform init && terraform apply -var lab_name=disk-lab
./reproduce.sh   # chart 0.164.0: three runs
./fix.sh         # helm upgrade to chart 0.165.0: three runs, then all six side by side
./cleanup.sh && terraform destroy -var lab_name=disk-lab

The raw output of my run is in the lab's evidence folder.

What I didn't test

Every file in this lab

Everything above runs from these files. Open any of them to copy it, or clone the repo as shown:

Sources

Disclosure: I work at Splunk, part of Cisco. This is my personal blog; the post isn't sponsored or reviewed by my employer.


I reproduced this in a disposable AWS lab. The lab code and raw output are in the repo. Drafted with AI assistance and reviewed by me.

Read next

OpenTelemetry code owner for two Collector components. Writes hands-on AWS container guides, each tested in a lab. See the proof