feat(agent): send the disk activity, and conform to contract v0.4.0 - #48
Merged
Merged
Conversation
nabil1440
added this pull request to stack #38
September 24, 2026 06:06
nabil1440
marked this pull request as ready for review
September 24, 2026 06:07
nabil1440
force-pushed
the
agent/43-disk-activity
branch
from
September 24, 2026 08:09
473cff6 to
8333996
Compare
Contract v0.4.0, "Disk activity": the bytes and the operations that the hardware disks read and wrote in the minute, from /proc/diskstats, and their peaks each second within the minute. null in the first sample, after a reboot, after a counter went back, and without a hardware disk. The README pins contract v0.4.0. Closes #43
… minute The contract makes all eight disk fields null when a counter went back. A disk that is attached again under the same name can pass the check of the minute and still give a wrong delta; now a window that went back nulls the values of the minute too. A reading with no disks for a moment joins its windows.
nabil1440
force-pushed
the
agent/43-disk-activity
branch
from
September 24, 2026 08:14
8333996 to
1755fcf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #43.
Part of the monitoring agent stack. This PR is on top of #47. Contract v0.4.0, "Disk activity". After this PR, the agent conforms to contract v0.4.0, and the README pins it.
What changes
/proc/diskstats./sys/blockwith adevicelink, for examplevda,sdaornvme0n1. Partitions are not in/sys/block. Loop,ram,zram, device mapper and software RAID disks have no device. All hardware disks count, not only the disk of/.disk_read_bytes,disk_write_bytes,disk_read_ops,disk_write_ops, and the four peaks each seconddisk_read_max_bytes_per_second,disk_write_max_bytes_per_second,disk_read_max_ops_per_secondanddisk_write_max_ops_per_second.nullin the first sample, after a reboot, after a reading older than 90 seconds, when no disk has a hardware device, and when a counter went back, also inside one window.wiremoves to v0.4.0. Before this PR,wire.gostill said v0.2.1.Tests
/proc/diskstatsof a cloud server and with the 14 columns of an older kernel, the choice of disks, the values and the peaks, a new disk, a reading without disks, a counter that went back in the minute and in one window, and the cases ofnull.make checkpasses.