Apache HTTP Server

Apache monitoring for httpd web servers

by Obseria · Open source and data
  • OpenTelemetry
  • Infrastructure Observability
  • Open source and data
Category
Open source and data
Key metrics
9
Ready-made
5 dashboards & alerts
Setup
3 steps
Standard
OTLP

Enable mod_status, add the apache receiver to the OpenTelemetry Collector and Obseria shows workers, requests, traffic and the scoreboard of every Apache HTTP Server, together with the PHP or Java applications behind it.

Built on mod_status

The apache receiver reads the machine-readable server-status page that ships with httpd; no extra module is needed.

Worker saturation at a glance

Busy and idle workers and the scoreboard show how close each server is to MaxRequestWorkers before visitors notice.

Web tier in context

TopoGraph links the web server to the hosts and applications behind it, and Obseria Intelligence uses that map to find the cause of slow pages.

Obseria interface

Obseria apps and capabilities: observability, APM, infrastructure and integrations
Obseria home dashboard with service health, open problems, SLO compliance and ingestion
Obseria trace explorer with span list and span attributes

Ready the moment data arrives

  • Apache overview: requests, traffic, connections
  • Worker usage and scoreboard per server
  • Alert on few idle workers
  • Alert on unexpected restarts (uptime reset)
  • HTTP status codes per virtual host from access logs

What Obseria monitors in Apache HTTP Server

Workers

Busy and idle workers, the most direct capacity signal of the prefork, worker and event MPMs.

Scoreboard

Workers by state, such as reading, sending reply, keepalive, logging or waiting for connection.

Requests and traffic

Total requests and bytes served, the basis for throughput dashboards.

Connections

Current connections handled by the server.

CPU and load

CPU load and time of the httpd processes plus 1, 5 and 15 minute load figures reported by mod_status.

Access and error logs

access_log and error_log via the filelog receiver, for status codes and errors per virtual host.

The Apache HTTP Server signals that matter

Obseria collects these values automatically and shows them in ready-made dashboards and alerts.

MetricUnitWhat it tells you
apache.workers{workers}Busy and idle workers; few idle workers mean the server is close to its limit.
apache.scoreboard{workers}Workers per scoreboard state, to see whether they read, write, keep connections alive or wait.
apache.requests{requests}Requests served by the server; the rate gives requests per second.
apache.trafficByBytes served; the rate shows outbound bandwidth per server.
apache.current_connections{connections}Connections currently handled by the server.
apache.request.timemsTotal time spent on handling requests; divided by requests it gives the average duration.
apache.cpu.load%CPU load of the httpd processes as reported by mod_status.
apache.load.1%Server load over the last minute as reported by mod_status.
apache.uptimesTime since the server was started, to catch unexpected restarts.

Set up Apache HTTP Server monitoring in minutes

  1. 1

    Enable mod_status

    Load mod_status, set ExtendedStatus On and expose /server-status only to the network of your Collector.

  2. 2

    Add the receiver

    Add the apache receiver with the endpoint http://host/server-status?auto; the ?auto suffix selects the machine-readable format.

  3. 3

    Send to Obseria

    Export via otlphttp to your Obseria OTLP endpoint; each web server appears with its worker and request metrics.

Example configuration · YAML
# httpd.conf: enable mod_status
#   LoadModule status_module modules/mod_status.so
#   ExtendedStatus On
#   <Location "/server-status">
#       SetHandler server-status
#       Require ip 10.0.0.0/8 172.16.0.0/12
#   </Location>
receivers:
  apache:
    endpoint: http://apache:80/server-status?auto
    collection_interval: 30s
exporters:
  otlphttp:
    endpoint: ${env:OBSERIA_OTLP_ENDPOINT}
    headers:
      Authorization: "Bearer ${env:OBSERIA_TOKEN}"
service:
  pipelines:
    metrics:
      receivers: [apache]
      exporters: [otlphttp]

Why Apache monitoring matters

The Apache HTTP Server, often simply called httpd, has served websites for decades and still runs a large share of PHP applications, content management systems and reverse proxy setups. Its capacity is defined by the number of workers it can run. When all workers are busy, new connections queue and visitors see slow pages or timeouts, even though the application behind it may be fine. Apache monitoring shows how busy your workers are, what they are doing and how much traffic each server handles.

The OpenTelemetry Collector includes the apache receiver. It reads the status page of mod_status in its machine-readable form and turns it into metrics such as apache.workers, apache.requests and apache.scoreboard. That gives you Apache HTTP Server monitoring based on a module that ships with httpd and on open standards for transport.

Signals that matter for httpd monitoring

  • Worker saturation: apache.workers by state shows busy and idle workers. When idle workers approach zero, the server is at MaxRequestWorkers.
  • What workers do: apache.scoreboard splits workers into states. Many workers in keepalive point to keepalive settings; many sending replies point to slow clients or large responses.
  • Throughput: the rates of apache.requests and apache.traffic give requests and bytes per second per server.
  • Request time: apache.request.time divided by requests gives an average duration; for percentiles per URL, use traces from the application behind Apache.
  • Stability: apache.uptime resets on restarts, so crashes and unplanned reloads become visible.

Note that ExtendedStatus On is required for the per-request counters. Without it the scoreboard is reported, but throughput is not.

Common Apache web server problems and how to detect them

Exhausted workers

A slow backend, for example a PHP application waiting on its database, keeps workers busy for longer. Idle workers drop to zero and new requests wait, while CPU on the web server stays low.

Keepalive hogging workers

With the prefork MPM, idle keepalive connections occupy a full worker each. The scoreboard shows many workers in the keepalive state and few available for new requests.

Traffic spikes and bots

A sudden jump in request rate without a matching change in business traffic often comes from crawlers or abusive clients. Access logs with status codes and client addresses help to confirm the source.

Unexpected restarts

Segmentation faults in modules or memory limits can restart httpd. A reset uptime together with error log entries tells you when and why.

Best practices for Apache HTTP Server monitoring

  1. Restrict /server-status to the Collector's network with Require ip; never expose it publicly.
  2. Use the endpoint with the ?auto suffix, which the receiver needs.
  3. Alert on the share of idle workers rather than on request rate alone.
  4. Collect access and error logs with the filelog receiver to get status codes per virtual host.
  5. Instrument the applications behind Apache with OpenTelemetry and add synthetic checks for key pages, so you see the user-facing result as well.

How Obseria helps with Apache monitoring

Obseria receives Apache metrics and logs over OTLP from the OpenTelemetry Collector or the Obseria Agent and shows them next to host metrics and application traces. TopoGraph connects each web server to its host and the services behind it. When pages get slow, Obseria Intelligence checks worker saturation, backend latency and host resources and presents the root cause with its chain of evidence. Dashboards, alerts and SLOs are included.

If you run Apache next to NGINX or behind a load balancer, all web servers appear in the same views with the same host attributes. That makes it easy to compare servers, spot the one that runs out of workers first and plan capacity before a campaign or seasonal peak.

Learn more

Apache HTTP Server monitoring FAQ

No. The receiver uses mod_status, which ships with Apache HTTP Server. You only load it, set ExtendedStatus On and expose /server-status to the Collector.

The ?auto suffix returns the machine-readable version of the status page. The receiver requires it; the HTML page cannot be parsed.

mod_status reports workers for the prefork, worker and event MPMs, so the receiver works with all of them. The meaning of a worker differs: a process for prefork, a thread for worker and event.

mod_status only provides server-wide figures. For latency per URL and endpoint, instrument the application behind Apache with OpenTelemetry or parse the response time field from the access log.

Yes. mod_status is available on Windows too, and the receiver only needs HTTP access to the status page. Note that Windows uses the winnt MPM with threads.

Start monitoring Apache HTTP Server today

Connect Apache HTTP Server in minutes with OpenTelemetry or the Obseria Agent. Free for 14 days.