The Apache server itself has two modules that provide server information. One is the mod_status module, which dynamically displays the running status of the current server, and the other is the mod_info module, it mainly provides server-attached configuration information. Through these two modules, you can easily understand the working status and configuration of Apache, but on a server that is working normally, these two modules are not recommended. One is to consume system resources, and the other is to leak server information easily.
1. mod_status module
The mod_status module provides the server running status.
· Number of processes currently working
· Number of idle Processes
· Time when the server is running
· Host and request currently being connected
· CPU usage of a process and percentage of the current Apache CPU usage
· Average requests per second, number of bytes sent per second, and number of bytes sent per request
To use the mod_status module, add the following content to the httpd. conf file:
SetHandler server-statusOrder deny, allowDeny from allAllow from 10.204.10.246Extendedstatus OnExtendedstatus command is used to display other information, including the response information of each subhttpd Process
You can access the information provided by the mod_status module through http: // url/server-status, as follows:
Information provided by the mod_status module
2. mod_info Module
Compared with the mod_status module, the mod_info module only provides server configuration information and cannot be dynamically updated. modify the configuration file to use this module:
SetHandler server-infoOrder deny,allowDeny from allAllow from 10.204.10.246
You can access the information provided by the mod_info module through http: // url/server-info, as follows:
Information provided by the mod_info Module
3. Use third-party tools to monitor Apache (recommended)
At present, there are too many methods and tools on the network to monitor Apache. In fact, there are professional monitoring software, such as zabbix, Nagios, OpenNMS, etc... They can monitor not only Apache, but also the temperature of other servers, services, networks, even printers, air conditioners, and physical devices...
Zabbix is an enterprise open-source solution based on PHP scripts for Distributed System Monitoring and network monitoring. Of course, it can also monitor Apache servers. Currently, Zabbix is used.
Zabbix has the following features:
• Automatically discovers servers and network devices
• Distributed monitoring and centralized Web management
• User security authentication and customizable authorization Methods
• Set and view monitoring results on the Web interface
• Supports mainstream databases (the pressure of large-scale monitoring is also in the database)
Monitoring Information provided by zabbix
In the future, I will record my experiences in learning and using Zabbix in my blog ..
Nagios
Nagios is a monitoring system that monitors system running status and network information. You can monitor specified servers and services in nagios, there are many ways to report to administrators (which can be done by mainstream monitoring products). I am not familiar with Emma.