Skip to content

Commit af965ea

Browse files
committed
docs: improve README
1 parent 14d5fe9 commit af965ea

File tree

3 files changed

+50
-5
lines changed

3 files changed

+50
-5
lines changed

CLAUDE.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Overview Section of a Monitoring Plugins' README
2+
3+
If you have to improve or write the overview section of a monitoring plugin, analyze the code of the plugin, and analyze the used library functions from the plugins' "lib" folder. The key improvements should be:
4+
5+
Structure:
6+
* Organized into three clear sections: Alerting Logic, Data Collection, and Compatibility
7+
* Appends "Important Notes" if applicable
8+
* Uses bullet points for scanability
9+
10+
Clarity:
11+
* Leading sentence immediately states the main purpose
12+
* Alerting Logic section clearly explains which metrics trigger alerts and the consecutive run requirement
13+
* Explicitly states specific behaviour in certain situations
14+
15+
Precision:
16+
* Explains special technical features
17+
* Lists which specific fields trigger alerts
18+
* Mentions specific SQLite features and references the actual SQLite database path
19+
20+
Target Audience:
21+
* Assumes familiarity with Nagios/Icinga. BTW: No need to mention "perfdata output is for graphing" or "Full perfdata output for all metrics in Nagios/Icinga".
22+
* Uses technical terminology appropriate for experienced sysadmins (context switches, non-blocking measurement, state
23+
persistence)
24+
* Focuses on operational aspects: alerting behavior, data collection method, compatibility
25+
26+
The new overview gives administrators the essential information they need to understand how the check behaves in
27+
production before deploying it.

check-plugins/cpu-usage/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Monitors system-wide CPU utilization with sustained load detection to avoid fals
2222

2323
* Cross-platform: Linux, Windows, and all psutil-supported systems
2424
* Uses SQLite database (`$TEMP/linuxfabrik-monitoring-plugins-cpu-usage.db`) for trend tracking
25-
* Full perfdata output for graphing all metrics in Nagios/Icinga
2625

2726

2827
## Fact Sheet

check-plugins/memory-usage/README.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,31 @@
22

33
## Overview
44

5-
Displays system memory usage and alerts on sustained high usage. Reports total/used/available/free plus shared/buffers/cached, and evaluates WARN/CRIT against the overall usage percentage. Perfdata is emitted for all fields so you can graph trends over time. With `--top`, the most memory-consuming processes are listed (by RSS and percentage) to aid quick diagnosis. Cross-platform on all psutil-supported systems (Linux, Windows, \*BSD, macOS).
5+
Monitors physical memory utilization with threshold-based alerting on overall memory usage percentage. Reports total, used, available, and free memory, plus platform-specific metrics (shared, buffers, cached).
66

7-
Hints:
7+
**Alerting Logic:**
88

9-
* Be aware of the differences in memory counting between different tools like top, htop, glances, GNOME System Monitor etc.
10-
* Memory counting also changed between different Linux Kernel versions.
9+
* Thresholds apply to overall memory usage percentage (default: WARN at 90%, CRIT at 95%)
10+
* Single-point evaluation - alerts immediately when threshold exceeded (no sustained load detection)
11+
* Uses psutil's `percent` calculation which accounts for platform-specific memory semantics
12+
13+
**Data Collection:**
14+
15+
* Physical memory statistics only (RAM, excludes swap)
16+
* Reports `available` metric for cross-platform usable memory estimation
17+
* Platform-specific metrics on Linux/BSD: shared, buffers, cached
18+
* Optional top-N memory-consuming processes by RSS (`--top`, default: 5), aggregated by process name
19+
20+
**Compatibility:**
21+
22+
* Cross-platform: Linux, Windows, \*BSD, macOS
23+
* Stateless check - no database or state persistence required
24+
25+
**Important Notes:**
26+
27+
* Memory usage calculations differ between tools (top, htop, free) due to different counting methods and kernel versions
28+
* This check uses psutil's cross-platform `available` metric for consistency
29+
* Process memory percentages may sum to >100% on Linux due to shared memory accounting
1130

1231

1332
## Fact Sheet

0 commit comments

Comments
 (0)