You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -912,7 +912,7 @@ Each plugin README follows a fixed structure. See [check-plugins/example/README.
912
912
1. **Overview**: Describes *what* the plugin does. A leading sentence stating the main purpose. This must include at least the text from the plugin's `DESCRIPTION` variable. Followed by subsections:
913
913
914
914
* **Data Collection**: How data is gathered (shell command, API, psutil, etc.), filtering options, SQLite usage, non-blocking measurement.
915
-
* **Compatibility**: Supported platforms only (Linux, Windows, Cross-platform). No version requirements, no tool dependencies, no module requirements - those belong in Important Notes or the Fact Sheet.
915
+
* **Compatibility**: Supported platforms, required tools or modules.
916
916
* **Important Notes** (optional): Operational edge cases the admin must know before deploying, for example: "Requires sudo", "Only works with Redis 3.0+", "First run returns OK with 'Waiting for more data.'", "After a reboot, counters reset and the check waits for a new baseline". No implementation details - only things that affect deployment and daily operations.
917
917
918
918
2. **Fact Sheet**: Key properties as a table (download link, check name, check interval, parameters required, Windows support, 3rd party modules, state file path, etc.). Only list applicable rows.
Copy file name to clipboardExpand all lines: check-plugins/apache-httpd-status/README.md
+215-2Lines changed: 215 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,220 @@ Monitors Apache httpd performance via the mod_status endpoint (server-status?aut
13
13
14
14
**Compatibility:**
15
15
16
-
* Cross-platform
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`
17
18
19
+
**Important Notes:**
18
20
19
-
**
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
24
+
25
+
Busy workers (workers serving requests) are:
26
+
27
+
*`C`: Closing connection
28
+
*`D`: DNS Lookup
29
+
*`G`: Gracefully finishing
30
+
*`I`: Idle cleanup of worker
31
+
*`K`: Keepalive (read)
32
+
*`L`: Logging
33
+
*`R`: Reading Request
34
+
*`S`: Starting up
35
+
*`W`: Sending Reply
36
+
37
+
Idle workers are:
38
+
39
+
*`_`: Waiting for Connection
40
+
41
+
Free workers are:
42
+
43
+
*`.`: Open slot with no current process
44
+
45
+
Load the Apache module:
46
+
47
+
```text
48
+
LoadModule status_module modules/mod_status.so
49
+
```
50
+
51
+
If you want to configure `/server-status` in your main Apache config file:
52
+
53
+
```text
54
+
<IfModule status_module>
55
+
# the alias prevents the processing of .htaccess files, which could contain RewriteRules
56
+
# that interfere with server-status
57
+
Alias /server-status /dev/null
58
+
ExtendedStatus On
59
+
<Location /server-status>
60
+
SetHandler server-status
61
+
Require local
62
+
</Location>
63
+
</IfModule>
64
+
```
65
+
66
+
If you want to configure `/server-status` in a virtual host:
67
+
68
+
```text
69
+
<IfModule status_module>
70
+
ExtendedStatus On
71
+
</IfModule>
72
+
73
+
<VirtualHost *:80>
74
+
ServerName localhost
75
+
<IfModule status_module>
76
+
# the alias prevents the processing of .htaccess files, which could contain RewriteRules
Current Time ! Wednesday, 28-Jul-2021 14:40:48 CEST
146
+
Restart Time ! Monday, 19-Jul-2021 20:17:11 CEST
147
+
Check Interval ! 3m 52s
148
+
Uptime ! 1W 1D
149
+
Requests ! 54.0
150
+
Bytes ! 122.0KiB
151
+
Request Duration ! 10s 28ms
152
+
Load1 ! 0.08
153
+
Load5 ! 0.06
154
+
Load15 ! 0.01
155
+
Workers Total ! 400
156
+
Busy ! 2
157
+
Idle ! 98
158
+
Usage (%) ! 0.5
159
+
Parent Server ConfigGeneration ! 19
160
+
Parent Server MPMGeneration ! 18
161
+
Server Name ! 192.168.122.97
162
+
Server MPM ! worker
163
+
Server Version ! Apache/2.4.48 (Fedora) OpenSSL/1.1.1k mod_qos/11.66
164
+
Server Built ! Jun 2 2021 00:00:00
165
+
```
166
+
167
+
168
+
## States
169
+
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.
175
+
176
+
177
+
## Perfdata / Metrics
178
+
179
+
| Name | Type | Description |
180
+
|----|----|----|
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). |
212
+
213
+
214
+
## Troubleshooting
215
+
216
+
From <https://httpd.apache.org/docs/2.4/mod/mod_status.html#troubleshoot>:
217
+
218
+
> The check may be used as a starting place for troubleshooting a situation where your server is consuming all available resources (CPU or memory), and you wish to identify which requests or clients are causing the problem.
219
+
>
220
+
> First, ensure that you have `ExtendedStatus` set on, so that you can see the full request and client information for each child or thread.
221
+
>
222
+
> Now look in your process list (using top, or similar process viewing utility) to identify the specific processes that are the main culprits. Order the output of top by CPU usage, or memory usage, depending on what problem you're trying to address.
223
+
>
224
+
> Reload the server-status page, and look for those process ids, and you'll be able to see what request is being served by that process, for what client. Requests are transient, so you may need to try several times before you catch it in the act, so to speak.
225
+
>
226
+
> This process should give you some idea what client, or what type of requests, are primarily responsible for your load problems. Often you will identify a particular web application that is misbehaving, or a particular client that is attacking your site.
0 commit comments