Prerequisites for monitoring apache server metrics

Prerequisites for monitoring apache server metrics

The Apache mod_status module enables users to view detailed performance metrics of the Apache web server. You must enable and configure the mod_status correctly in the Apache configuration file to get performance metrics from Apache and view the data in Applications Manager.

Perform the following steps in the Apache configuration file to enable and configure the status module and get the performance metrics: 

1. Enable the mod_status:

  1. Open the Apache configuration file. Depending on your OS, the Apache configuration file will be located at one of the following locations:

/etc/apache2/httpd.conf (Ubuntu, Debian, openSUSE)

/etc/apache2/apache2.conf (Ubuntu, Debian, openSUSE)

/etc/httpd/httpd.conf (Red Hat)

/etc/httpd/conf/httpd.conf (CentOS, Fedora)

  1. In the same file, for example the /etc/httpd/conf/httpd.conf file, search for the following line:

#LoadModule status_module modules/mod_status.so

  1. Uncomment the line mentioned above by removing #:

LoadModule status_module modules/mod_status.so 


2. Configure the mod_status:

  1. In the same Apache configuration file, search for the following code block:

# Allow server status reports generated by mod_status,

# with the URL of http://servername/server-status

# Change the ".example.com" to match your domain to enable.

#

#<location server-status="">

#    SetHandler server-status

#    Order deny,allow

#    Deny from all

#    Allow from .example.com

#</location>

  1. Uncomment the location block by removing # from the lines, and update the Allow, Order, and Deny directives as shown below:

<Location /server-status>

SetHandler server-status

Order allow,deny

Deny from all

Allow from all

</Location>

Notes

Notes:

1. The above configuration is for the default Apache configuration. To change the Apache stats URL, you can modify the Location tag in the above configuration.
2. Above configuration does not work for virtual hosts. If you have virtual hosts configured, place the location block as shown below inside the VirtualHost block:


<VirtualHost *:80>

 …

<Location /server-status>

SetHandler server-status

Order allow,deny

Deny from all

Allow from example.com

 </Location>

</VirtualHost>


3. Enable Extended-Status:

  1. In the same file, for example the /etc/httpd/conf/httpd.conf file, search for the following line:

#ExtendedStatus On

  1. Uncomment the line mentioned above by removing #

ExtendedStatus On

4. Service restart:

  1. Restart the Apache server to apply the changes. 

5. Access Apache stats page:

  1. Verify if the Apache stats URL(http://localhost:80/server-status) is accessible.

Info
The URL will differ based on your Apache configuration.




                  New to ADSelfService Plus?

                    • Related Articles

                    • Troubleshooting - Apache Server

                      Troubleshooting - Apache Server monitor If you're encountering issues in Apache Server monitor in Applications Manager, follow these steps to diagnose and resolve the problem: 1. Verify the Server is an Apache Server: Open Command Prompt on the ...
                    • Troubleshooting "No Data Available" in Apache Server Monitoring

                      If you’re not seeing certain metrics in Apache server monitor, it may be due to one or more of the following reasons. Here's a step-by-step guide for resolving the issue: 1. Extended Status Metrics Some metrics are only available when Extended Status ...
                    • Troubleshooting - Apache Solr

                      To troubleshoot Apache Solr Monitor, follow the below steps: Verify Accessibility: Ensure that the Apache Solr instance is accessible from the Applications Manager server. Check Host and Port: Make sure you’ve entered the correct host and port number ...
                    • Prerequisites for monitoring Cron jobs

                      Below is the list of prerequisites for monitoring Cron jobs: Curl must be installed in the remote Linux machine.  Script linked to the cron job must have executable permission. The machine where Applications Manager is installed should be reachable ...
                    • Configure Apache Server running in WAMP server

                      Introduction WampServer refers to a software stack for the Microsoft Windows operating system, consisting of the Apache web server, OpenSSL for SSL support, MySQL database and PHP programming language. It comes as a bundled application with all the ...