Apache Web Server monitoring.

Optimize Apache server performance and gain in-depth visibility into critical performance parameters.

The Apache HTTP Server, commonly known as Apache, is the world's most used web server software. Configure Site24x7 Apache plugin to monitor the performance of your apache server and stay on top of issues at all times.

This document details how to configure the Apache plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Apache servers.

Apache performance monitoring metrics:

Take informed troubleshooting decisions by keeping track of critical Apache metrics including:

Requests per second

"req_per_sec" records the The total number of HTTP requests the web server is processing per second.

Busy workers

Use the metric "busy_workers" and record the total number of workers serving requests i.e., the total number of Apache processes actively processing an HTTP request.

Idle workers

The total number of idle workers is monitored using the metric "idle_workers". I.e., the total number of idle Apache processes waiting for an HTTP request.


The metric "uptime" gets the total amount of time the Apache server has been up and running.

Bytes per second

"bytes_per_sec" records the total amount of data the web server is transferring per second.

CPU load

Use the metric "cpu_load" and get the total percentage of CPU used by the Apache server.

Bytes per request

The average number of bytes being transferred per HTTP request is obtained using the metric "bytes_per_req".

Total accesses

The total number of accesses on the Apache server is monitored using the metric "total_accessess".

How it works?

  • Log-in to your Site24x7 account. Sign up here if you don't have one
  • Download and install the latest version of Site24x7 Linux agent
  • Install the Apache plugin
  • The agent will execute the Apache plugin and push the data to the Site24x7 server.


  • This is a Python based plugin and will support Python version 2.7 and greater.

Apache plugin installation:

  • Create a directory with the name "apache", under Site24x7 Linux Agent plugin directory - /opt/site24x7/monagent/plugins/
  • Download the file ""apache.py" from our GitHub repository and place it under the "apache" directory
  • Commands to perform the above step:
  • cd /opt/site24x7/monagent/plugins/
    mkdir apache
    cd apache
    wget https://raw.githubusercontent.com/site24x7/plugins/master/apache/apache.py

Configure Apache to support statistics:

  • Edit your httpd.conf file so that it enables sending statistics. As mentioned at https://httpd.apache.org/docs/2.4/mod/mod_status.html#machinereadable
  • Sample code for stats setup in the file "/usr/local/apache/conf/httpd.conf":
  • Make sure you add the text "ExtendedStatus On" in your code to enable the Apache plugin to fetch all the desired metrics
  • ExtendedStatus On
    < Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from ::1
    < /Location>
  • Restart apache server and check wether the configured URL is receiving apache statistics by opening it in a browser

Apache plugin configuration:

  • Make the following changes in the apache plugin file "apache.py" - /opt/site24x7/monagent/plugins/apache/apache.py
  • Replace the shebang character "#!" with the appropriate path for Python 3 in your system
  • Eg : #!/usr/local/bin/python3
  • Change the value of global variable "url" to the values specified while configuring Apache statistics
  • Eg : url = "http://localhost:80/server-status?auto"
  • Please retain the "?auto" suffix at the end as this is required for fetching the statistics

Monitor additional metrics:

  • To monitor additional metrics, edit the "apache.py" file and add the new metrics that need monitoring
  • Increment the plugin version value in the file "apache.py" to view the newly added metrics ( For e.g., change the default plugin version from PLUGIN_VERSION = "1" to "PLUGIN_VERSION = "2")

Related plugins:

  • Redis plugin - Monitor performance metrics of your Redis databases
  • MySQL plugin - Monitor performance metrics of your MySQL databases
  • Zombie Process plugin - Analyze performance of your Zombie Process server
  • Nagios plugin - Execute thousands of Nagios plugins in Site24x7 without the need of running a Nagios server
  • Out-of-the-box plugins - Monitor your entire app stack with our extensive list of integrations
  • Create custom plugins - Create custom Linux and Windows plugins and monitor custom attributes

World's leading companies


Don't have a Site24x7 account? Sign up now!