Apache Monitoring 

The Apache HTTP Server, also known as Apache HTTPd, is a commonly used web server software. Its wide usage has been due to its easy customizable feature and being open source.

The first plugin added for a server monitor is free. After that, each plugin monitor is charged at $1/month. Each plugin can have upto 25 attributes.

Start 30-day free trial Try now, sign up in 30 seconds
Apache Monitoring

Monitor Apache Web Server Performance

Monitoring Apache servers is critical to keep a check on their performance and be aware of degradation issues and bottlenecks. Use our ready-to-install plugin integration and see real time performance trends and historical metrics, all in a single dashboard.

Performance Metrics

Requests per Second

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

Busy Workers

Use the metric busy_workers to get the total number of processes actively processing an HTTP request

Idle Workers

idle_workers is the total number of idle workers/idle processes waiting for an HTTP request. If you have very few or no idle processes, it means your server is using up all the processes and new requests have to be on hold until the older requests are completed.

Uptime

The metric uptime gets the total amount of time the 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 web 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 server is monitored using the metric total_accessess.

Processes

Processes denotes the number of async processes.

Connections Async Closing

Connections Async Closing shows the number of async connections that are in the closing state.

Connections Async Keep Alive

Connections Async Keep Alive displays the number of async connections that are in the keep-alive state.

Connections Async Writing

Connections Async Writing denotes the number of async connections that are in the writing state.

CPU System

CPU System shows the percentage of time taken by the Apache process to access the system resources.

CPU User

CPU User displays the percentage of time taken by the Apache process to process the code.

Load1

Load1 shows the one-minute load average.

Load5

Load5 denotes the five-minute load average.

Load15

Load15 displays the 15-minute load average.

Total Connections

Total Connections depicts the total number of connections on the Apache server.

Total kbytes

Total kbytes records the total kilobytes served.

Uptime

Uptime shows the total amount of time the server has been up and running.

Version

Version denotes the Apache server version.

Setup

Prerequisites

Installation

  • Create a folder with the name 'apache_monitoring'.
  • Download the "apache_monitoring.py" and "apache_monitoring.cfg" file from our GitHub repository and place it in the 'apache_monitoring' folder.
    wget https://raw.githubusercontent.com/site24x7/plugins/master/apache_monitoring/apache_monitoring.py
    wget https://raw.githubusercontent.com/site24x7/plugins/master/apache_monitoring/apache_monitoring.cfg
  • Add the configuration in "apache_monitoring.cfg" as below:
    [localhost]
    url ="http://localhost:80/server-status?auto"
    username="username"
    password ="password"
    timeout="30"
    plugin_version ="1"
    heartbeat ="true"
    logs_enabled ="true"
    log_type_name ="Apache Access Logs"
    log_file_path ="/var/log/apache2/access.log"
  • Move the 'apache_monitoring' folder to the Site24x7 Linux agent plugin directory '/opt/site24x7/monagent/plugins/'.

The agent will automatically execute the plugin within five minutes and send performance data to the Site24x7 data center.

Log in to Site24x7 and go to Server > Plugin Integrations > click on the name of the plugin monitor. You will be able to view performance charts and set thresholds for the various performance metrics.

The agent will automatically execute the plugin within five minutes and send performance data to the Site24x7 data center.

Automatic AppLogs integration

  • To analyze the metrics with Apache logs and find the exact root cause of issues, you can perform configuration changes in the apache_monitoring.cfg file.
    Example:
    logs_enabled ="true"
    log_type_name="Apache Access Logs"
    log_file_path="/var/log/apache2/access.log"

Verify Plugin Output

  • Manually execute the plugin script using the following command and verify its output:
    python apache_monitoring.py --username="username" --password="password"

Plugin Contribution

Feel free to contribute to our existing plugin and come up with suggestions or feedback on our Community.

  • Supported Platforms:
  • Python Version: 2.7 & above
  • Linux Agent Version:15.0.0 & above