EV Observe - Configure Apache Monitoring Prerequisites
Apache is an open source HTTP Web server. EV Observe uses dedicated service templates to collect performance data and activity data on Apache servers.
To use control points based on Apache, specific prerequisites must first be met.
- You configure these prerequisites once only.
- This is done in two steps:
- Enable the module for accessing usage statistics
- Specify the domain to restrict the amount of information collected
Procedures
How to configure Apache monitoring prerequisites
Step 1: Enable the module for accessing usage statistics
See the relevant Apache documentation
1. Go to the Apache server to be monitored.
2. Run the command below to enable the Status module.
a2enmod status
3. Restart the Apache server.
Step 2: Specify the domain to restrict the amount of information collected
1. Open the configuration file called httpd.conf or apache2.conf.
2. Add the lines below and replace the <Domain> value with the domain whose information you want to collect.
example Allow from example.com
<Location /server-status>
SetHandler server-status
Order Deny,Allow
Deny from all
Allow from <Domain>
</Location>
You can now view Apache usage statistics by accessing the following page, http://<Domain>/server-status.
example http://example.com/server-status
Step 3: Set up monitoring in EV Observe using the service templates specific to Apache
See the general procedure: How to deploy a service using a service template
- Apache-Data-Rate
- Apache-Requests-Rate
- Apache-Busy-Idle-Workers
- Apache-Slow-Requests
How to configure the Apache-Slow-Requests service template
Step 1: Configure the log format in Apache
1. Open the Apache configuration file.
2. Add the %T column to the end of the LogFormat directive.
example
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %T" combined
Step 2: Configure the Apache-Slow-Requests service template in EV Observe
1. Go to the Web app.
2. Select Configuration > Services in the menu.
3. Select the Apache-Slow-Requests service template to create a new service.
4. Select the Availability and checks tab and specify the Duration argument. Indicate the number of seconds after which requests will be logged as slow.