Skip to content

Commit 09fc470

Browse files
committed
refactor(memory-usage): fetch top items on Windows again
1 parent a765f79 commit 09fc470

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

check-plugins/memory-usage/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ options:
4040
-c, --critical CRIT Set the critical threshold for memory usage (in
4141
percent). Default: 95
4242
--top TOP List x "Top most memory consuming processes". Use
43-
`--top=0` to disable this feature. Default: 5 on Linux,
44-
0 on Windows
43+
`--top=0` to disable this feature. Default: 5
4544
-w, --warning WARN Set the warning threshold for memory usage (in
4645
percent). Default: 90
4746
```

check-plugins/memory-usage/icingaweb2-module-director/memory-usage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@
240240
"3": {
241241
"varname": "memory_usage_top",
242242
"caption": "Memory Usage: Top",
243-
"description": "List x \"Top most memory consuming processes\". Use `--top=0` to disable this feature. Default: 5 on Linux, 0 on Windows",
243+
"description": "List x \"Top most memory consuming processes\". Use `--top=0` to disable this feature.",
244244
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
245245
"format": null,
246246
"settings": {
@@ -282,7 +282,7 @@
282282
"7": {
283283
"varname": "memory_usage_windows_top",
284284
"caption": "Memory Usage: Top",
285-
"description": "List x \"Top most memory consuming processes\". Use `--top=0` to disable this feature. Default: 5 on Linux, 0 on Windows",
285+
"description": "List x \"Top most memory consuming processes\". Use `--top=0` to disable this feature.",
286286
"datatype": "Icinga\\Module\\Director\\DataType\\DataTypeString",
287287
"format": null,
288288
"settings": {

check-plugins/memory-usage/memory-usage

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ except ImportError:
2727

2828

2929
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
30-
__version__ = '2025090701'
30+
__version__ = '2025090703'
3131

3232
DESCRIPTION = """Displays system memory usage and alerts on sustained high usage.
3333
Reports total/used/available/free plus shared/buffers/cached, and evaluates WARN/CRIT
@@ -37,7 +37,7 @@ graph trends over time. With `--top`, the most memory-consuming processes are li
3737
systems (Linux, Windows, *BSD, macOS)."""
3838

3939
DEFAULT_CRIT = 95 # %
40-
DEFAULT_TOP = 0 if lib.base.WINDOWS else 5
40+
DEFAULT_TOP = 5
4141
DEFAULT_WARN = 90 # %
4242

4343

@@ -73,7 +73,7 @@ def parse_args():
7373
'--top',
7474
help='List x "Top most memory consuming processes". '
7575
'Use `--top=0` to disable this feature. '
76-
'Default: 5 on Linux, 0 on Windows',
76+
'Default: %(default)s',
7777
dest='TOP',
7878
type=int,
7979
default=DEFAULT_TOP,

0 commit comments

Comments
 (0)