Skip to content

Commit a765f79

Browse files
committed
refactor(disk-io): fetch top items on Windows again
1 parent 0de231b commit a765f79

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

check-plugins/disk-io/README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ period’s total bandwidth against the maximum ever observed for that disk
6161
(RWmax). WARN/CRIT trigger if the period average exceeds the configured
6262
percentage of RWmax for COUNT consecutive runs. Perfdata is emitted for each
6363
disk (busy_time, read_bytes, read_time, write_bytes, write_time) so you can
64-
graph trends. On Linux the check automatically focuses on real block devices
65-
with mountpoints; on Windows it uses psutil’s disk counters. Optionally, --top
66-
lists the processes that generated the most I/O traffic (read/write totals) to
67-
help identify offenders. This check is cross-platform and works on Linux,
68-
Windows, and all psutil-supported systems. The check stores its short trend
69-
state locally in an SQLite DB to evaluate sustained load across runs.
64+
graph trends. On Linux the check automatically focuses on "real" block devices
65+
with mountpoints; on Windows it uses psutil’s disk counters. Optionally,
66+
`--top` lists the processes that generated the most I/O traffic (read/write
67+
totals) to help identify offenders. This check is cross-platform and works on
68+
Linux, Windows, and all psutil-supported systems. The check stores its short
69+
trend state locally in an SQLite DB to evaluate sustained load across runs.
7070
7171
options:
7272
-h, --help show this help message and exit
@@ -87,8 +87,7 @@ options:
8787
characters that satisfy the condition inside it, zero or
8888
more times. Default:
8989
--top TOP List x "Top processes that generated the most I/O traffic".
90-
Use `--top=0` to disable this feature. Default: 5 on Linux,
91-
0 on Windows
90+
Use `--top=0` to disable this feature. Default: 5
9291
--warning WARN Threshold for disk bandwidth saturation (over the last
9392
`--count` measurements) as a percentage of the maximum
9493
bandwidth the disk can support. Default: >= 80

check-plugins/disk-io/disk-io

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ except ImportError:
3535

3636

3737
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
38-
__version__ = '2025090702'
38+
__version__ = '2025090703'
3939

4040
DESCRIPTION = """Checks disk I/O bandwidth over time and alerts on sustained saturation, not
4141
short spikes. The check records per-disk read/write counters and then derives current (R1/W1)
@@ -44,8 +44,8 @@ maximum ever observed for that disk (RWmax). WARN/CRIT trigger if the period ave
4444
the configured percentage of RWmax for COUNT consecutive runs.
4545
4646
Perfdata is emitted for each disk (busy_time, read_bytes, read_time, write_bytes, write_time)
47-
so you can graph trends. On Linux the check automatically focuses on real block devices with
48-
mountpoints; on Windows it uses psutil’s disk counters. Optionally, --top lists the processes
47+
so you can graph trends. On Linux the check automatically focuses on "real" block devices with
48+
mountpoints; on Windows it uses psutil’s disk counters. Optionally, `--top` lists the processes
4949
that generated the most I/O traffic (read/write totals) to help identify offenders.
5050
5151
This check is cross-platform and works on Linux, Windows, and all psutil-supported systems.
@@ -57,7 +57,7 @@ DEFAULT_CACHE_EXPIRE = 90
5757
DEFAULT_COUNT = 5 # measurements; if check runs once per minute, this is a 5 minute interval
5858
DEFAULT_CRIT = 90 # %
5959
DEFAULT_MATCH = ''
60-
DEFAULT_TOP = 0 if lib.base.WINDOWS else 5
60+
DEFAULT_TOP = 5
6161
DEFAULT_WARN = 80 # %
6262

6363

@@ -112,7 +112,7 @@ def parse_args():
112112
'--top',
113113
help='List x "Top processes that generated the most I/O traffic". '
114114
'Use `--top=0` to disable this feature. '
115-
'Default: 5 on Linux, 0 on Windows',
115+
'Default: %(default)s',
116116
dest='TOP',
117117
type=int,
118118
default=DEFAULT_TOP,

check-plugins/disk-io/icingaweb2-module-director/disk-io.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@
178178
"tpl-service-generic"
179179
],
180180
"max_check_attempts": 5,
181-
"notes": "Checks disk I/O bandwidth over time and alerts on sustained saturation, not short spikes. The check records per-disk read/write counters and then derives current (R1/W1) and period averages (R{COUNT}/W{COUNT}). It compares the period\u2019s total bandwidth against the maximum ever observed for that disk (RWmax). WARN/CRIT trigger if the period average exceeds the configured percentage of RWmax for COUNT consecutive runs. Perfdata is emitted for each disk (busy_time, read_bytes, read_time, write_bytes, write_time) so you can graph trends. On Linux the check automatically focuses on \u201creal\u201d block devices with mountpoints; on Windows it uses psutil\u2019s disk counters. Optionally, --top lists the processes that generated the most I/O traffic (read/write totals) to help identify offenders. This check is cross-platform and works on Linux, Windows, and all psutil-supported systems. The check stores its short trend state locally in an SQLite DB to evaluate sustained load across runs.",
181+
"notes": "Checks disk I/O bandwidth over time and alerts on sustained saturation, not short spikes. The check records per-disk read/write counters and then derives current (R1/W1) and period averages (R{COUNT}/W{COUNT}). It compares the period\u2019s total bandwidth against the maximum ever observed for that disk (RWmax). WARN/CRIT trigger if the period average exceeds the configured percentage of RWmax for COUNT consecutive runs. Perfdata is emitted for each disk (busy_time, read_bytes, read_time, write_bytes, write_time) so you can graph trends. On Linux the check automatically focuses on \"real\" block devices with mountpoints; on Windows it uses psutil\u2019s disk counters. Optionally, `--top` lists the processes that generated the most I/O traffic (read/write totals) to help identify offenders. This check is cross-platform and works on Linux, Windows, and all psutil-supported systems. The check stores its short trend state locally in an SQLite DB to evaluate sustained load across runs.",
182182
"notes_url": "https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/disk-io",
183183
"object_name": "tpl-service-disk-io",
184184
"object_type": "template",
@@ -229,7 +229,7 @@
229229
"tpl-service-generic"
230230
],
231231
"max_check_attempts": 5,
232-
"notes": "Checks disk I/O bandwidth over time and alerts on sustained saturation, not short spikes. The check records per-disk read/write counters and then derives current (R1/W1) and period averages (R{COUNT}/W{COUNT}). It compares the period\u2019s total bandwidth against the maximum ever observed for that disk (RWmax). WARN/CRIT trigger if the period average exceeds the configured percentage of RWmax for COUNT consecutive runs. Perfdata is emitted for each disk (busy_time, read_bytes, read_time, write_bytes, write_time) so you can graph trends. On Linux the check automatically focuses on \u201creal\u201d block devices with mountpoints; on Windows it uses psutil\u2019s disk counters. Optionally, --top lists the processes that generated the most I/O traffic (read/write totals) to help identify offenders. This check is cross-platform and works on Linux, Windows, and all psutil-supported systems. The check stores its short trend state locally in an SQLite DB to evaluate sustained load across runs.",
232+
"notes": "Checks disk I/O bandwidth over time and alerts on sustained saturation, not short spikes. The check records per-disk read/write counters and then derives current (R1/W1) and period averages (R{COUNT}/W{COUNT}). It compares the period\u2019s total bandwidth against the maximum ever observed for that disk (RWmax). WARN/CRIT trigger if the period average exceeds the configured percentage of RWmax for COUNT consecutive runs. Perfdata is emitted for each disk (busy_time, read_bytes, read_time, write_bytes, write_time) so you can graph trends. On Linux the check automatically focuses on \"real\" block devices with mountpoints; on Windows it uses psutil\u2019s disk counters. Optionally, `--top` lists the processes that generated the most I/O traffic (read/write totals) to help identify offenders. This check is cross-platform and works on Linux, Windows, and all psutil-supported systems. The check stores its short trend state locally in an SQLite DB to evaluate sustained load across runs.",
233233
"notes_url": "https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/disk-io",
234234
"object_name": "tpl-service-disk-io-windows",
235235
"object_type": "template",
@@ -298,7 +298,7 @@
298298
"5": {
299299
"varname": "disk_io_top",
300300
"caption": "Disk I/O: Top",
301-
"description": "List x \"Top processes that generated the most I/O traffic\". Use `--top=0` to disable this feature. Default: 5 on Linux, 0 on Windows",
301+
"description": "List x \"Top processes that generated the most I/O traffic\". Use `--top=0` to disable this feature.",
302302
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
303303
"format": null,
304304
"settings": {
@@ -362,7 +362,7 @@
362362
"11": {
363363
"varname": "disk_io_windows_top",
364364
"caption": "Disk I/O: Top",
365-
"description": "List x \"Top processes that generated the most I/O traffic\". Use `--top=0` to disable this feature. Default: 5 on Linux, 0 on Windows",
365+
"description": "List x \"Top processes that generated the most I/O traffic\". Use `--top=0` to disable this feature.",
366366
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
367367
"format": null,
368368
"settings": {

0 commit comments

Comments
 (0)