Skip to content

Commit cdc4baa

Browse files
committed
docs: rewrite all 244 READMEs to consistent structure (Overview, Fact Sheet, States, Perfdata, Troubleshooting)
1 parent c9e4c00 commit cdc4baa

File tree

242 files changed

+7478
-4052
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

242 files changed

+7478
-4052
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3434
* CONTRIBUTING: run pylint without `--disable` flags
3535
* CONTRIBUTING: remove inline `pylint: disable` comments from code examples
3636
* All plugins: improve and expand DESCRIPTION to clearly explain what each plugin does for the admin deploying it
37+
* All plugins: rewrite all READMEs to follow consistent structure (Overview, Fact Sheet, Help, Usage Examples, States, Perfdata, Troubleshooting, Credits)
3738
* example: rewrite as comprehensive skeleton covering all standard patterns (argparse, SQLite delta calculations, regex filtering, `--lengthy` table output, human-readable formatting, get_state/get_worst, Grafana-compatible perfdata)
3839
* example: rewrite README as skeleton template with Overview, Fact Sheet, States, Perfdata, and Troubleshooting sections
3940
* Update and extend pre-commit hooks (add `check-added-large-files`, `check-merge-conflict`, `check-yaml`; update all hook versions)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ Each plugin README follows a fixed structure. See [check-plugins/example/README.
920920
| Fact | Value |
921921
|----|----|
922922
| Check Plugin Download | <https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/example> |
923-
| Nagios/Icinga Check Name | `check_example` (for SEO: helps admins find the plugin when searching for the traditional Nagios-style name) |
923+
| Nagios/Icinga Check Name | `check_example` (for SEO: helps admins find the plugin when searching for the traditional Nagios-style name). Always use underscores, never dashes. |
924924
| Check Interval Recommendation | Every minute, Every 5/15/30 minutes, Every hour, Every 4/8/12 hours, Every day, Every week |
925925
| Can be called without parameters | Yes/No |
926926
| Compiled for Windows | Yes (when `.windows` file exists)/No (runs with Python interpreter) |

check-plugins/about-me/README.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,33 @@
22

33
## Overview
44

5-
Reports an overview about the host dimensions, its network interfaces, deployed software and recurring jobs:
5+
Collects and displays key system information: OS and kernel version, CPU configuration (physical, logical, and usable cores plus frequency), RAM, disk count, virtualization type, network interfaces, listening ports, systemd services and timers, cron jobs, installed packages, and user accounts. Optionally queries dmidecode for firmware and hardware details, and fetches the public IP address. This check is purely informational and never raises alerts. Requires root or sudo.
66

7-
* System and hardware information (OS, CPUs, disks, ram, UEFI y/n etc.)
8-
* Interfaces: All network interfaces with their IP address
9-
* Listening TCP and UDP ports
10-
* Non-default software (software that was added later)
11-
* Non-default system users
12-
* systemctl get-default: Default systemd target that will be booted into
13-
* systemctl list-unit-files: List of all systemd services, mounts and automounts (excluding user units)
14-
* systemctl list-timers: List of all system systemd timers (excluding user timers)
15-
* crontab: List of crontabs that are found in the usual locations. Note that this might not be complete.
7+
**Data Collection:**
168

17-
Have a look at the output example below.
9+
* Gathers hardware and OS data via `psutil` (if available), `lsblk`, `stat`, `/proc/mounts`, and various `systemctl` commands
10+
* Optionally runs `dmidecode` (via `--dmidecode`) to retrieve BIOS, chassis, base board, processor, and system boot information
11+
* Optionally fetches the public IP address from one or more configurable "what is my IP" services (via `--public-ip-url`)
12+
* Lists all network interfaces with IPv4 addresses, listening TCP/UDP ports, non-default packages, non-default users, systemd services/mounts/automounts/timers, and cron jobs
13+
* Optionally guesses Icinga Director tags for automated host classification (via `--tags`)
1814

19-
Plugin execution may take up to 30 seconds, depending on the amount or type of installed software.
15+
**Compatibility:**
16+
17+
* Linux only (relies on `systemctl`, `lsblk`, `/proc/mounts`, package managers like `rpm`/`dpkg`)
18+
19+
**Important Notes:**
20+
21+
* Plugin execution may take up to 30 seconds, depending on the amount or type of installed software
22+
* The `--dmidecode` option requires sudo permissions
23+
* If `psutil` is not installed, some metrics (CPU frequency, network interfaces) will be unavailable
2024

2125

2226
## Fact Sheet
2327

2428
| Fact | Value |
2529
|----|----|
2630
| Check Plugin Download | <https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/about-me> |
31+
| Nagios/Icinga Check Name | `check_about_me` |
2732
| Check Interval Recommendation | Once a day or once a week |
2833
| Can be called without parameters | Yes |
2934
| Compiled for Windows | No |
@@ -74,7 +79,6 @@ options:
7479
Shortened output example:
7580

7681
```text
77-
Plugin Output
7882
server.example.com: Fedora Linux 42 (Workstation Edition) Kernel 6.16.4-200.fc42.x86_64 on Bare-Metal, Dell Inc. XPS 13 9350, Firmware: 1.20, SerNo: 12345678, Proc: Intel Core Ultra 7 258V, CPUs: 8/8/8 (phys/lcpu/onln), Current Speed: 3943 MHz, 30.9GiB/4.0GiB RAM (virtmem/max; reboot recommended), Disk nvme0n1 1.8T, UEFI boot, Display Server x11, tuned profile "throughput-performance", born 2024-03-20. About-me v2025090901
7983
8084
Hardware Info from `dmidecode`:
@@ -155,13 +159,13 @@ crontab:
155159

156160
| Name | Type | Description |
157161
|----|----|----|
158-
| cpu_logical | Number | Number of physical cores multiplied by the number of threads that can run on each core (this is known as Hyper Threading) |
159-
| cpu_physical | Number | Number of physical cores |
160-
| cpu_usable | Number | The number of usable CPUs. This may not necessarily be equivalent to the actual number of CPUs the current process can use. That can vary in case process CPU affinity has been changed, Linux cgroups are being used or (in case of Windows) on systems using processor groups or having more than 64 CPUs. |
161-
| cpu_freq | Number | On Linux reports the current real-time value, on all other platforms this usually represents the nominal "fixed" value (never changing) |
162-
| disks | Number | Number of disks |
163-
| osversion | None | 'Fedora 33' becomes '33', 'CentOS 7.4.1708' becomes '741708' - to see when an upgrade happened |
164-
| ram | Bytes | Size of memory |
162+
| cpu_freq | Number | Current CPU frequency in MHz. On Linux, reports the real-time value; on other platforms, usually the nominal fixed value. |
163+
| cpu_logical | Number | Number of logical CPUs (physical cores multiplied by threads per core, i.e. Hyper-Threading). |
164+
| cpu_physical | Number | Number of physical CPU cores. |
165+
| cpu_usable | Number | Number of usable CPUs (may differ from total due to CPU affinity, cgroups, or processor groups). |
166+
| disks | Number | Number of disks. |
167+
| osversion | None | OS version as a comparable number, e.g. "Fedora 33" becomes "33", "CentOS 7.4.1708" becomes "741708". |
168+
| ram | Bytes | Total RAM size. |
165169

166170

167171
## Credits, License

check-plugins/apache-httpd-status/README.md

Lines changed: 58 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22

33
## Overview
44

5-
This check "allows a server administrator to find out how well their server is performing". For the check plugin to work you have to enable `mod_status` and set `ExtendedStatus` to `On`. Have a look at <https://httpd.apache.org/docs/2.4/mod/mod_status.html>.
5+
Monitors Apache httpd performance via the mod_status endpoint (server-status?auto). Alerts when worker usage exceeds the configured thresholds. Reports busy and idle workers, request rates, bytes served, CPU load, connection states, and system load averages. Requires "ExtendedStatus On" in the Apache configuration for full metrics. Uses a local SQLite database to calculate per-second rates from cumulative counters.
6+
7+
**Data Collection:**
8+
9+
* Fetches data from the Apache `mod_status` machine-readable endpoint (`server-status?auto`)
10+
* Parses the scoreboard to count workers in each state (reading, replying, keepalive, DNS lookup, closing, logging, starting, finishing, waiting, free slots)
11+
* Uses a local SQLite database to store previous values and calculate per-interval deltas for accesses, bytes, and duration
12+
* On the first run (or after a restart), returns "Waiting for more data." until at least two measurements are available
13+
14+
**Compatibility:**
15+
16+
* Works with any Apache httpd version that provides `mod_status`
17+
* Some metrics (connection stats, load averages, processes) are only available in newer versions of `mod_status`
18+
19+
**Important Notes:**
20+
21+
* `mod_status` must be loaded and `ExtendedStatus On` must be set in the Apache configuration for full metrics. Without `ExtendedStatus`, only worker counts and scoreboard data are reported.
22+
* The check alerts on the percentage of busy workers relative to the total number of worker slots (busy + idle + free)
23+
* Workers in the "Gracefully finishing" (G) state are counted as idle workers, not busy workers
624

725
Busy workers (workers serving requests) are:
826

@@ -72,11 +90,11 @@ If you want to configure `/server-status` in a virtual host:
7290
| Fact | Value |
7391
|----|----|
7492
| Check Plugin Download | <https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/apache-httpd-status> |
75-
| Check Interval Recommendation | Once a minute |
93+
| Nagios/Icinga Check Name | `check_apache_httpd_status` |
94+
| Check Interval Recommendation | Every minute |
7695
| Can be called without parameters | Yes |
7796
| Compiled for Windows | No |
78-
| Requirements | Enable `mod_status` and set `ExtendedStatus` to `On` |
79-
| Uses SQLite DBs | `$TEMP/linuxfabrik-monitoring-plugins-apache-httpd-status.db` |
97+
| Uses State File | `$TEMP/linuxfabrik-monitoring-plugins-apache-httpd-status.db` |
8098

8199

82100
## Help
@@ -149,44 +167,48 @@ Server Built ! Jun 2 2021 00:00:00
149167

150168
## States
151169

152-
* WARN or CRIT if more than 80% or 95% busy workers compared to the total possible number of workers found.
170+
* OK if the percentage of busy workers is below the warning threshold.
171+
* OK with "Waiting for more data." on the first run or after an Apache restart.
172+
* WARN if the percentage of busy workers is >= `--warning` (default: 80).
173+
* CRIT if the percentage of busy workers is >= `--critical` (default: 95).
174+
* `--always-ok` suppresses all alerts and always returns OK.
153175

154176

155177
## Perfdata / Metrics
156178

157179
| Name | Type | Description |
158180
|----|----|----|
159-
| Accesses | Number | A total number of accesses and byte count served |
160-
| BusyWorkers | Number | workers_closing + workers_dns + workers_idle + workers_keepalive + workers_logging + workers_reading + workers_replying + workers_starting |
161-
| Bytes | Number | Bytes sent |
162-
| ConnsAsyncClosing | Number | |
163-
| ConnsAsyncKeepAlive | Number | |
164-
| ConnsAsyncWriting | Number | |
165-
| ConnsTotal | Number | |
166-
| CPULoad | Number | |
167-
| IdleWorkers | Number | workers_finishing + workers_waiting |
168-
| Load1 | Number | |
169-
| Load15 | Number | |
170-
| Load5 | Number | |
171-
| ParentServerConfigGeneration | Number | |
172-
| ParentServerMPMGeneration | Number | |
173-
| Processes | Number | |
174-
| Stopping | Number | |
175-
| Total Duration | Seconds | |
176-
| TotalWorkers | Number | |
177-
| Uptime | Seconds | The time the server has been running for |
178-
| WorkerUsagePercentage | Percentage | |
179-
| workers_closing | Number | BusyWorkers; Closing connection, 'C' in Apache Scoreboard (SERVER_CLOSING) |
180-
| workers_dns | Number | BusyWorkers; DNS Lookup,'D' in Apache Scoreboard (SERVER_BUSY_DNS) |
181-
| workers_finishing | Number | IdleWorkers; Gracefully finishing, 'G' in Apache Scoreboard (SERVER_GRACEFUL) |
182-
| workers_free | Number | Open slot with no current process, '.' in Apache Scoreboard (SERVER_DEAD) |
183-
| workers_idle | Number | BusyWorkers; Idle cleanup of worker, 'I' in Apache Scoreboard (SERVER_IDLE_KILL) |
184-
| workers_keepalive | Number | BusyWorkers; Keepalive (read), 'K' in Apache Scoreboard (SERVER_BUSY_KEEPALIVE) |
185-
| workers_logging | Number | BusyWorkers; Logging, 'L' in Apache Scoreboard (SERVER_BUSY_LOG) |
186-
| workers_reading | Number | BusyWorkers; Reading Request, 'R' in Apache Scoreboard (SERVER_BUSY_READ) |
187-
| workers_replying | Number | BusyWorkers; Sending Reply, 'W' in Apache Scoreboard (SERVER_BUSY_WRITE) |
188-
| workers_starting | Number | BusyWorkers; Starting up, 'S' in Apache Scoreboard (SERVER_STARTING) |
189-
| workers_waiting | Number | IdleWorkers; Waiting for Connection, '\_' in Apache Scoreboard (SERVER_READY) |
181+
| Accesses | Number | Total number of accesses during the check interval. |
182+
| BusyWorkers | Number | Number of workers currently processing requests. |
183+
| Bytes | Bytes | Total bytes served during the check interval. |
184+
| ConnsAsyncClosing | Number | Number of async connections in closing state. |
185+
| ConnsAsyncKeepAlive | Number | Number of async connections in keep-alive state. |
186+
| ConnsAsyncWriting | Number | Number of async connections in writing state. |
187+
| ConnsTotal | Number | Total number of connections. |
188+
| CPULoad | Number | CPU load of the Apache process. |
189+
| IdleWorkers | Number | Number of idle workers (finishing + waiting). |
190+
| Load1 | Number | System load average, 1 minute. |
191+
| Load15 | Number | System load average, 15 minutes. |
192+
| Load5 | Number | System load average, 5 minutes. |
193+
| ParentServerConfigGeneration | Number | Apache configuration generation counter. |
194+
| ParentServerMPMGeneration | Number | Apache MPM generation counter. |
195+
| Processes | Number | Number of Apache processes. |
196+
| Stopping | Number | Number of stopping processes. |
197+
| Total Duration | Seconds | Total duration of all requests during the check interval. |
198+
| TotalWorkers | Number | Total number of worker slots (busy + idle + free). |
199+
| Uptime | Seconds | Time the server has been running. |
200+
| WorkerUsagePercentage | Percentage | Percentage of workers currently processing requests. |
201+
| workers_closing | Number | Workers closing connections ("C" in scoreboard). |
202+
| workers_dns | Number | Workers performing DNS lookup ("D" in scoreboard). |
203+
| workers_finishing | Number | Workers gracefully finishing ("G" in scoreboard). |
204+
| workers_free | Number | Open slots with no current process ("." in scoreboard). |
205+
| workers_idle | Number | Workers in idle cleanup ("I" in scoreboard). |
206+
| workers_keepalive | Number | Workers in keepalive read ("K" in scoreboard). |
207+
| workers_logging | Number | Workers logging ("L" in scoreboard). |
208+
| workers_reading | Number | Workers reading request ("R" in scoreboard). |
209+
| workers_replying | Number | Workers sending reply ("W" in scoreboard). |
210+
| workers_starting | Number | Workers starting up ("S" in scoreboard). |
211+
| workers_waiting | Number | Workers waiting for connection ("_" in scoreboard). |
190212

191213

192214
## Troubleshooting

check-plugins/apache-httpd-version/README.md

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,30 @@
22

33
## Overview
44

5-
This plugin lets you track if Apache httpd is End-of-Life (EOL). To compare against the current/installed version of Apache httpd, the check has to run on the Apache httpd server itself.
5+
Checks the installed Apache httpd version against the endoflife.date API and alerts if the version is end-of-life or if newer major, minor, or patch releases are available. By default, alerts 30 days before the official EOL date. The offset is configurable.
66

7-
This check plugin alerts n days before or after the EOL date is reached. Optionally, it can also alert on available major, minor or patch releases (each independently).
7+
**Data Collection:**
88

9-
Hints:
9+
* Detects the installed Apache httpd version by running `httpd -v` (RHEL) or `apache2 -v` (Debian-based systems)
10+
* Queries the [endoflife.date API](https://endoflife.date/api/apache.json) to determine EOL status and available releases
11+
* Caches the API response in a local SQLite database to reduce network calls
1012

11-
* Runs on all systems where the Apache is named either "httpd" or "apache2".
13+
**Compatibility:**
14+
15+
* Runs on all systems where the Apache binary is named either `httpd` or `apache2`
16+
* Must run on the Apache httpd server itself to detect the installed version
1217

1318

1419
## Fact Sheet
1520

1621
| Fact | Value |
1722
|----|----|
1823
| Check Plugin Download | <https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/apache-httpd-version> |
24+
| Nagios/Icinga Check Name | `check_apache_httpd_version` |
1925
| Check Interval Recommendation | Once a day |
2026
| Can be called without parameters | Yes |
2127
| Compiled for Windows | No |
22-
| Uses SQLite DBs | `$TEMP/linuxfabrik-lib-version.db` |
28+
| Uses State File | `$TEMP/linuxfabrik-lib-version.db` |
2329

2430

2531
## Help
@@ -74,17 +80,20 @@ Apache httpd v2.4.37 (EOL unknown, patch 2.4.57 available)
7480

7581
## States
7682

77-
* WARN if software is EOL
78-
* Optional: WARN when new major version is available
79-
* Optional: WARN when new minor version is available
80-
* Optional: WARN when new patch version is available
83+
* OK if the installed version is not EOL and no newer releases are flagged.
84+
* WARN if the installed version is EOL (or will be within `--offset-eol` days, default: -30).
85+
* WARN if `--check-major` is set and a newer major version is available.
86+
* WARN if `--check-minor` is set and a newer minor version is available.
87+
* WARN if `--check-patch` is set and a newer patch version is available.
88+
* UNKNOWN if Apache httpd is not found.
89+
* `--always-ok` suppresses all alerts and always returns OK.
8190

8291

8392
## Perfdata / Metrics
8493

8594
| Name | Type | Description |
8695
|----|----|----|
87-
| apache-httpd-version | Number | Installed Apache httpd version as float. "2.2.34" becomes "2.234". |
96+
| apache-httpd-version | Number | Installed Apache httpd version as float, e.g. "2.4.57" becomes "2.457". |
8897

8998

9099
## Credits, License

0 commit comments

Comments
 (0)