The quick download
A reliable Apache monitor shows how the server is handling requests and where performance problems may be developing.
-
An effective Apache monitor tracks requests per second, response time, busy workers, idle workers, uptime, HTTP errors, CPU, and memory.
-
Apache web server monitoring uses the protected /server-status endpoint to collect requests per second, busy and idle workers, active connections, and throughput from approved monitoring collector IP addresses.
-
Apache performance monitoring helps identify slow requests, worker exhaustion, traffic spikes, and resource pressure before they affect users.
-
Use LogicMonitor for Apache web server performance monitoring, with dashboards and alerts that connect Apache activity to the wider infrastructure and applications behind it.
Apache monitoring helps you understand whether Apache HTTP Server is available, handling requests efficiently, and approaching its capacity limits. By tracking Apache activity alongside host resources, logs, and application data, you can detect worker exhaustion, rising latency, HTTP errors, and traffic changes before they affect users.
The quickest way to start monitoring Apache is to enable the mod_status module, protect the /server-status endpoint, and connect it to a monitoring platform.
This blog explains the setup, the metrics that matter, and how to troubleshoot common Apache performance problems.
What Is Apache Monitoring?
Apache monitoring is the process of tracking the health, availability, and performance of an Apache HTTP Server. Often called Apache HTTPd or Apache httpd, it is an open-source web server maintained by the Apache Software Foundation and widely used in Linux-based server environments.
Because Apache HTTP Server hosts websites, APIs, and web applications, its performance can directly affect the services that depend on it.
Apache monitoring shows how much traffic the server handles, how quickly it responds, whether its workers have enough capacity, and whether errors are affecting users.
Key Metrics to Track
To gain full visibility into your Apache server’s health, performance, and capacity, track these key metrics:
- Uptime and availability: Confirms that Apache is running and responding to requests.
- Requests per second: Shows the volume of traffic Apache handles over time.
- Busy and idle workers: Compares workers serving requests with workers available for new requests.
- Response time: Shows how long Apache takes to answer requests.
- HTTP errors: Tracks failed requests, including 4xx and 5xx responses.
- Access and error logs: Provide details about client requests, configuration issues, and server failures.
- CPU, memory, disk, and network use: Shows whether the host has enough resources to support Apache.
Common Tools and Methods
To capture and visualize the Apache performance metrics and host-level resource data detailed above, use the following tools and methods:
mod_status: This built-in module publishes live server statistics to the /server-status endpoint, allowing monitoring tools to scrape and analyze real-time request and worker data.- Access and error logs: These files capture detailed request history and server diagnostics, providing the granular context needed to troubleshoot specific configuration issues or failed client requests.
- External monitoring platforms: Tools such as LogicMonitor, PRTG, Netdata, and other monitoring systems can collect Apache data, create dashboards, compare historical performance, and send alerts.
For a basic Apache webserver monitoring setup, use loading mod_status, protect the /server-status endpoint, and connect it to a monitoring platform. This gives you both current Apache activity and historical data for performance analysis.
How Apache Monitoring Works
Apache HTTP Server handles web requests through worker processes or threads. When traffic grows, workers can become busy, memory use can climb, and requests can take longer to complete. A server may still answer requests while these problems are building, so host-level CPU or memory charts alone do not tell the whole story.
Apache monitoring combines data from the web server, the operating system, and the application’s logs. The mod_status module exposes live activity through `/server-status`. A monitoring platform can then collect those values, keep historical data, and notify you when behavior moves outside an acceptable range.
Apache’s Multi-Processing Module (MPM) determines how the server manages processes and threads to handle traffic. Prefork MPM uses separate processes for each request, while Worker and Event MPMs use threads, which are generally more resource-efficient.
Your monitoring data depends on which MPM is in use. For instance, the Event MPM manages asynchronous connections and keep-alives more efficiently than Prefork, meaning metrics for busy workers and active connections will differ.
Identifying your active MPM ensures you interpret these metrics correctly to accurately assess your server’s capacity.
What Apache Monitoring Data Tells You
Here’s what it tells you:
| Data source | What it shows | Best used for |
|---|---|---|
| mod_status | Workers, connections, requests, throughput, and uptime | Understanding current Apache activity |
| Access logs | Requested URLs, response codes, and request frequency | Identifying failing or slow request patterns |
| Error logs | Configuration, proxy, startup, and runtime errors | Finding why Apache requests or services fail |
| Host monitoring | CPU, memory, disk, and network usage | Determining whether the server is under resource pressure |
| Application monitoring or tracing | Time spent in applications, databases, and dependencies | Finding latency outside Apache |
How to Set Up Apache Monitoring for Better Web Server Performance
To set up Apache monitoring, follow these steps:
Step 1: Make Sure You Are Loading the mod_status Module
Apache exposes its runtime performance data through mod_status, so first confirm that the module is present and loaded. Package-managed installations use distribution-specific commands or configuration files.
| Distribution | Action |
|---|---|
| Ubuntu or Debian | Run /usr/sbin/a2enmod status, then reload or restart Apache. |
| RHEL, CentOS, or Rocky Linux | In /etc/httpd/conf/httpd.conf, confirm that LoadModule status_module modules/mod_status.so is present and not commented out. |
| SUSE or SLES | Add status to the module list on the APACHE_MODULES= line in /etc/sysconfig/apache2. |
After making the change, check the Apache configuration before restarting it:
apachectl configtest
On some installations, the command is apache2ctl configtest. A successful test should report Syntax OK.
Step 2: Configure and Protect the mod_status Endpoint
To configure the mod_status module, enable extended statistics and expose a protected /server-status endpoint specifically for your monitoring collector. Never publish this endpoint to the public internet, as it can reveal sensitive request and worker information.
If Apache is behind a reverse proxy, load balancer, NAT device, or firewall, verify which source IP Apache actually sees. Restrict access using that address, and apply an equivalent restriction at the proxy or firewall layer.
After restarting Apache, test both the normal endpoint and the machine-readable endpoint:
ExtendedStatus On
<Location "/server-status">
SetHandler server-status
Require ip 192.168.10.10
</Location>Replace 192.168.10.10 with the address of the LogicMonitor collector or another approved monitoring host. If several collectors need access, list each approved address or use the network range that contains them. Keep the list narrow.
Older Apache 2.2 installations use a different access-control format:
ExtendedStatus On
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 192.168.10.10
</Location>The Order, Deny, and Allow directives are legacy syntax. Use the Require form on Apache 2.4 or later. If Apache is behind a reverse proxy, restrict access at that proxy as well as in Apache.
The configuration file varies by distribution:
- Ubuntu or Debian:
/etc/apache2/mods-available/status.conf - RHEL or CentOS:
/etc/httpd/conf/httpd.conf - openSUSE or SLES:
/etc/apache2/mod_status.conf
The module may be loaded in one file while the <Location> block belongs in another. Check the active configuration with:
apachectl -S
apachectl -t -D DUMP_MODULES | grep status
Then restart Apache with the service manager used by the operating system:
sudo systemctl restart apache2 # Ubuntu or Debian
sudo systemctl restart httpd # RHEL-based systemsThe distribution service script may assemble configuration fragments before Apache starts. That is why a service restart is preferable to sending a signal directly to the parent process during this setup.
For background on the wider server monitoring picture, see how Apache data fits with host CPU, memory, disk, and network measurements.
Step 3: Collect and Visualize Apache Metrics
Once mod_status is loaded and /server-status is protected, a monitoring tool can collect Apache data. With LogicMonitor’s Apache monitoring, the web server can be discovered, and its metrics can be graphed alongside CPU, memory, disk, and network data. That connection helps you tell whether a rise in response time began inside Apache or at the host beneath it.
To make this data actionable, consolidate these metrics into a centralized dashboard. A useful starting view tracks requests per second, busy and idle workers, HTTP errors, and response times alongside CPU and memory usage.
By aggregating these metrics across your infrastructure, you can identify traffic patterns, capacity bottlenecks, and anomalies at scale, ensuring your dashboards remain relevant even as your server environment grows.
How to Tell Whether Apache Is Healthy
Apache is generally operating normally when request volume, response time, worker activity, error rates, and host resources remain close to the server’s established baseline.
Investigate further when you see patterns such as:
- Busy workers remain close to
MaxRequestWorkers. - Idle workers stay near zero during sustained traffic.
- Request-processing time rises while request volume remains stable.
- 5xx responses increase.
- Active connections grow faster than request volume.
- Memory pressure causes swapping or repeated process restarts.
- Apache appears healthy, but application traces show increasing downstream latency.
No single metric proves that Apache is failing. Compare related metrics over the same time period and check the logs before changing configuration.
Key Apache Performance Metrics
The right Apache performance monitor should show web-server activity and the host resources that support it. These metrics provide a practical starting point:
| Metric | What it tells you | Warning pattern | What to investigate |
|---|---|---|---|
| Requests per second | Current request load and traffic patterns | Unexpected drop, sustained spike, or traffic change without a planned cause | Traffic growth, a sudden drop, or an unusual spike |
| Request processing time | How long Apache takes to handle requests | Rising trend or sustained deviation from baseline | Slow application code, upstream services, or resource pressure |
| Busy workers | How many workers are serving requests | Sustained proximity to MaxRequestWorkers | Worker saturation and queued requests |
| Idle workers | Spare capacity available for new requests | Near zero during normal sustained traffic | A sustained low value during normal traffic |
| Bytes per second | Response throughput and bandwidth use | Unexpected increase or decrease relative to request volume | Large responses, downloads, or network constraints |
| Active connections | Current client and keep-alive activity | Growing connections without similar request growth | Connection buildup or slow clients |
| 4xx responses | Client-side request failures | Sudden increase after a deployment or configuration change | Broken links, rejected requests, or bad deployments |
| 5xx responses | Server-side failures | Any sustained increase above the normal baseline | Application errors, proxy failures, or exhausted resources |
| CPU and memory | Host capacity available to Apache | Memory pressure, swapping, or sustained CPU saturation | Runaway processes, inefficient requests, or undersized hosts |
| Uptime | Whether the service has restarted or stopped | Unexpected restart or repeated process restarts | Crashes, maintenance, or service-manager failures |
Worker counts need context. A low idle-worker count is not automatically a fault during a short traffic burst. It deserves attention when it persists, coincides with rising latency, or approaches the configured MaxRequestWorkers value.
Common Apache Performance Patterns
Interpreting key metrics in combination often reveals the underlying cause of server issues. Use these common patterns to guide your troubleshooting:
High CPU and high request volume: Traffic growth or expensive requests may be using available CPUs. Compare request rate with URL-level access logs and application performance data.
Normal CPU but rising response time: Investigate the application, database, upstream service, network, or slow clients. Apache may be waiting rather than CPU-bound.
Busy workers near MaxRequestWorkers: Apache may be approaching worker exhaustion. Check request-processing time, connection states, keep-alive behavior, and memory usage before increasing the worker limit.
Many K scoreboard states: Persistent connections or slow clients may be occupying capacity. Compare keep-alive settings and connection counts with normal behavior.
Rising 5xx responses at stable traffic: Look for application failures, proxy errors, unavailable upstream services, or exhausted host resources.
How to Read the mod_status Scoreboard
The Apache scoreboard is a compact view of the worker state. Common symbols include:
Wfor a worker sending a replyKfor a keep-alive connection_for an idle worker.for an unused slot
The exact symbols and their meaning can vary by Apache version and Multi-Processing Module, so confirm the definitions in the server’s own server-status output.
For example, a long run of W characters with very few _ characters suggests that most workers are occupied. If the pattern continues while requests take longer to complete, check MaxRequestWorkers, application latency, database calls, and host memory. A large number of K states can point to persistent connections consuming worker capacity, especially when keep-alive settings do not match the workload.
The scoreboard is useful because it connects a count to a state. Instead of seeing only “high CPU,” you can ask whether Apache is serving requests, waiting on clients, or waiting for an upstream dependency.
How to Check If Apache Is Running
Before viewing performance metrics, ensure the Apache service is active and accessible. Use the following commands to verify system health and the status endpoint:
sudo systemctl status apache2 # Ubuntu or Debian
sudo systemctl status httpd # RHEL-based systems
curl http://127.0.0.1/server-status?autoIf the service is active but the status request fails, check the following common issues:
- 403 Forbidden: The access restriction in the <Location> block may be blocking your request.
- 404 Not Found: The handler is likely missing, the URL is incorrect, or the configuration file hasn’t loaded.
- No scoreboard data: Verify that ExtendedStatus is set to On and the status module is active.
For more detailed troubleshooting, review the error logs at /var/log/apache2/error.log (Ubuntu/Debian) or /var/log/httpd/error_log (RHEL-based systems).
How to Troubleshoot Apache Monitoring-Related Issues
Use the table below to narrow down common Apache monitoring problems and fix them:
| Problem | Likely cause | Fix |
|---|---|---|
| /server-status returns 403 | The collector address is not listed in the access rules | Add the approved collector IP and test the request again. |
| /server-status returns 404 | The handler or status configuration is not loaded | Check the module list, the <Location> block, and the active virtual host. |
| The service will not restart | A syntax error exists in the Apache configuration | Run apachectl configtest, correct the reported line, and restart again. |
| The page loads but has no useful data | ExtendedStatus On is missing or the wrong endpoint is being queried | Confirm the directive and request /server-status?auto. |
| Worker alerts fire during normal traffic | A fixed threshold does not reflect the server’s workload | Compare busy workers with a baseline and MaxRequestWorkers. |
| Apache shows high CPU | Expensive requests, traffic growth, or an application dependency may be involved | Compare CPU with request rate, latency, URLs, logs, and traces. |
When the web server is healthy but users report slow pages, review Apache access logs and the application behind the request. LogicMonitor’s log monitoring and application performance monitoring capabilities can provide that additional context where those features are part of your deployment.
Best Practices for Apache Server Monitoring
Reliable Apache monitoring combines a normal-performance baseline, focused alerts, historical analysis, and enough context to investigate a fault.
Establish Baselines
A baseline describes normal behavior for a particular server or service. Record requests per second, busy and idle workers, response time, error rates, CPU, and memory during ordinary traffic. Compare current values with similar periods rather than using one threshold for every host.
Automate Alerts
Start with alerts that lead to a clear response such as busy workers staying near MaxRequestWorkers, a sustained rise in 5xx responses, response time moving well above its normal range, or memory pressure causing swap activity.
Separate warning and critical levels, add a short evaluation period, and route notifications to the people who can act on them.
Analyze Trends
Historical Apache data helps with capacity planning. A steady increase in requests per second may call for more hosts or a higher worker limit. A growing error rate at a stable request volume points toward an application or dependency problem. Trend charts also help distinguish a one-minute traffic burst from a recurring capacity issue.
Use Logs and Traces Where They Add Context
mod_status shows what Apache is doing at the server level. Access and error logs explain which URLs fail and how often. Distributed tracing can connect a slow Apache request to an application service, database, or external dependency. Use each source for the question it answers instead of treating every data source as a replacement for the others.
How to Choose an Apache Monitoring Strategy
The scale and complexity of your server environment determine the most effective monitoring approach. Consider these three common strategies:
- Status polling: Reads
/server-statusand collects worker, request, connection, and throughput data. - Agent-based monitoring: Gathers Apache values together with operating-system metrics from the host.
- Full observability platforms: Combine Apache metrics with logs, traces, dashboards, alert routing, and dependency context.
For a single development server, a protected status page and a few local checks may be enough. However, production environments usually need historical data, alert history, host correlation, and a way to compare several Apache servers.
LogicMonitor fits the latter use case by bringing Apache and infrastructure data into the same monitoring view.
Use LogicMonitor For Apache Monitoring
LogicMonitor’s Apache integration brings Apache web server performance monitoring into the same platform as your infrastructure metrics, dashboards, alerts, and historical data.
Agentless Apache Monitoring
LogicMonitor’s agentless architecture collects Apache metrics through the protected mod_status endpoint. You can monitor metrics such as busy workers and response time without installing a separate Apache agent on each server.
Apache Performance in Context
Pre-built dashboards help you compare performance across multiple Apache web servers. You can view requests, response time, worker activity, HTTP status, and throughput alongside CPU, memory, disk, and network data.
This makes it easier to identify bottlenecks, worker exhaustion, and load-balancing issues.
Alerts for Unusual Apache Behavior
LogicMonitor uses machine learning to identify unusual behavior across Apache instances. Alerts can help you respond to changes in response time, worker activity, request volume, and HTTP errors while reducing notifications caused by normal patterns.
Apache Performance Trends and Forecasts
LogicMonitor stores collected metrics for up to two years without roll-ups or aggregation. This historical data supports Apache performance reporting, availability reviews, capacity planning, trend analysis, and forecasting.
Explore LogicMonitor’s Apache integration to see how Apache monitoring can connect web-server metrics with the wider infrastructure supporting your applications.
Want to correlate Apache performance with the infrastructure and applications behind it?
Explore LogicMonitor’s server monitoring capabilities.
FAQs
Does Apache Monitoring Affect Server Performance?
Monitoring through the lightweight mod_status endpoint typically has minimal overhead. To reduce impact, use a reasonable polling interval, collect only the metrics you need, and avoid repeatedly requesting the full human-readable status page when the machine-readable ?auto endpoint is available.
How Often Should Apache Metrics Be Collected?
A stateless production server is commonly checked every 30–60 seconds. Use more frequent collection when you need to detect short traffic spikes or worker saturation quickly, but balance that against monitoring overhead and alert noise.
Can Apache Be Monitored in a Container or Kubernetes Environment?
Yes. Expose the protected server-status?auto endpoint within the workload or pod, allow access only from the monitoring collector, and collect container-level metrics alongside Apache data. Also monitor restarts, CPU and memory limits, replica health, and service latency.



