10 Best Practices for Monitoring Apache Server Metrics

By Staff Contributor on January 16, 2020

Apache HTTP Server is an open-source, cross-platform web server capable of running on Linux, Unix, or Windows environments. It’s often used in combination with Linux, MySQL, and PHP/Perl/Python. Apache currently powers around 40% of active websites, including those of Cisco and Apple.

Apache offers a modular architecture, making it appropriate for different use cases. Apache’s core functions, including sockets and request protocols, are partitioned away from the other modules. This means developers can create and configure their own modules without worrying about how the new modules will affect core processes.

Why Is Apache Monitoring Important?

Apache monitoring is important because the server can easily fall victim to bottlenecks and other performance problems, especially as usage scales up. If your web server is slow, it takes longer for users to have their requests fulfilled—and even small slowdowns can impact your organization’s bottom line.

With Apache monitoring, you can ensure your server is configured to sufficiently handle the current scale of requests. Routine Apache monitoring can alert you to performance issues in real time and help you stop slowdowns before they affect end-user experience.

Monitoring the following Apache server metrics can help businesses keep track of website and application performance. With this information, you can optimize your system and ensure the server keeps up with new demand in the future. Certain best practices can help ensure you’re focusing on useful metrics:

Analyze Processing Time to Catch Poor Performance

When processing time is high, you can be sure your performance is suffering as well. Request processing time refers to the amount of time it takes for a request to be successfully completed, down to the microsecond. The rate of request refers to the average number of client requests successfully completed per second. These two metrics fall under the broader category of throughput and latency indicators, which lets you know if your poor server performance is load-related.

Monitor Bytes to See Server Limitations

Monitoring bytes can refer to a few different metrics. Bytes per second refers to the amount of data bytes transferred to and from the server, measured by the second. This metric can tell you how much your network infrastructure can handle and if you need to deploy additional resources. Bytes per request refers to the amount of data bytes sent through the server with each request. Be careful when monitoring total bytes served—this metric refers to how many bytes should have been served and not how many bytes were successfully served, which is a common mistake new admins make.

Track Uptime for Insight into Outages

Uptime is a measure of how long a server is operational, measured in seconds. If your server’s uptime suddenly drops, this most likely means you’re experiencing a small outage or need to restart your server. Because outages have a major impact on end users, it’s critical to keep an eye on uptime.

Measure Load for a Useful Overview

Many of the other performance metrics on this list can be consolidated into a single number called load. Ideally, you want your Apache server metrics to be as granular as possible, but looking at your server’s load number can give you a place to start when it comes to Apache monitoring. In a perfect world, your server’s load is less than your number of processing cores.

Use Memory Metrics to Distribute Resources

Memory usage, as the name suggests, refers to how much memory is currently being used on your server. When memory usage is high, it’s a signal to check your infrastructure. Use this metric to help you evenly distribute network resources.

Measure Efficiency With Multi-Processing Modules

Multi-processing modules (MPM) indicate how efficiently your server is using resources to process user requests and whether or not certain resources are being under- or over-utilized. Unless you’re using Apache on Linux or a Unix-like platform, you’ll only be able to run one MPM at a time, which Apache will choose for you based on what it thinks your environment needs.

There are different kinds of MPMs, but the three most important ones are prefork MPM, worker MPM, and event MPM. On a Unix-like platform, you’ll be able to choose from these three MPMs and more, but make sure you have a full understanding of each one, so you choose the right MPM for your needs. You might end up sticking with the default. To push Apache monitoring even further, you can use MPMs to look into worker utilization.

Add Resources If CPU Utilization Is High

This metric specifically refers to the processing usage of your hardware. If you notice usage rising consistently on your Apache servers, you don’t have enough resources available to handle your number of requests. If you’re using a multi-core system, make sure you’re looking at CPU usage across all cores.

Measure Bandwidth to Understand Latency

Your network’s bandwidth is another important latency and throughput indicator. Since bandwidth directly affects how quickly your website or application can process requests—which in turn directly affects end-user experience—network bandwidth is an important metric to monitor.

View Disk Usage to Ensure Sufficient Space

Apache needs space for logging and some temporary files, so make sure you’ve devoted enough disk space to your server.

Note the Error Rate to Catch Misconfigured Files

Sometimes Apache performance lags, even when resource usage and latency aren’t to blame. If you notice a high per second rate of client errors (like “404 Not Found”) and server errors (like “500 Internal Server Error”), misconfigured files could be the cause of the slowdowns.

Server Monitoring Software for Apache Monitoring

If you want to follow best practices for monitoring Apache server metrics, you should consider choosing an automated tool. SolarWinds® AppOptics™ is an Apache monitoring solution designed to help you streamline the Apache monitoring process and track critical metrics. The SaaS-based solution combines all-purpose application performance monitoring and infrastructure monitoring in one simple tool. AppOptics lets you monitor 2,000 metrics out of the box, including the ones needed to optimize Apache, although you can also configure the tool to monitor custom metrics.

With AppOptics, you can:

• Gain critical visibility into your Apache servers (and related applications)
• Ensure your Apache servers are performing to the best of their ability and keeping up with end-user requests
• Pinpoint the root cause of performance issues
• Reduce downtime
• Scale effectively, which is a prominent pain point with Apache

If you’re looking for additional insight into your Apache server, you should consider a logging solution that records events, requests, responses, and other server actions. AppOptics integrates with SolarWinds Loggly®, so you gain useful visibility into Apache access logs and error logs. With AppOptics and Loggly, it’s easy to follow best practices for monitoring Apache HTTP Server and ensure high levels of performance.

Related Posts