Article title: use mrtg to monitor apache status. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
This article uses scripts to monitor apache status
To monitor the apache status, this article uses the output information of the Apache module mod_status to obtain the required value.
The mod_status module allows the web server administrator to check the current running status of the server. this module outputs the current running status of the server in html format.
In general, it includes the following information:
1. number of workers (threads or processes) requesting servo requests
2. number of idle workers
3. status of each worker: number of completed requests and number of sent bytes.
4. total bytes and total sent bytes
5. time when the server has elapsed since it was started/restarted, and the time when the server has been running.
6. average requests per second, average number of bytes sent per second, and average number of bytes sent per request.
7. The current CPU usage percentage of each worker and the total CPU usage percentage of Apache.
8. hosts and requests being processed
In the apache configuration file
Mod_status.so needs to be loaded
LoadModule status_module modules/mod_status.so
ExtendedStatus On
SetHandler server-status
Order Deny, Allow
Deny from all
Allow from .askwan.com
Only hosts in the askwan.com domain are allowed to access this domain.
Pass
Http://mrtg.askwan.com/server-status page j to access the server status report page
Use it on a browser that supports automatic refresh
Http://mrtg.askwan.com/server-status? Refresh = N the access status page can be automatically refreshed every N seconds.
[1] [2] Next page