Monitor Apache HTTP Server with OpenTelemetry and SigNoz

SigNoz Cloud - This page applies to SigNoz Cloud editions.
Self-Host - This page applies to self-hosted SigNoz editions.

Overview

Monitor Apache HTTP Server in SigNoz with the OpenTelemetry Collector. You collect two signals:

  • Metrics: worker state, request throughput, traffic, and server load through the Collector apache receiver, which scrapes the mod_status endpoint.
  • Logs: access and error logs through the Collector file log receiver, parsed into structured fields you can query and aggregate.

Prerequisites

Ensure you have:

  • An Apache HTTP Server running version 2.4.13 or newer (required by the apache receiver)
  • An OpenTelemetry Collector that can reach the Apache status endpoint and read the Apache log files
  • An instance of SigNoz (either Cloud or Self-Hosted)

Collect Apache telemetry

The apache receiver scrapes the mod_status endpoint and maps the server statistics to OpenTelemetry metrics.

Step 1: Enable the Apache status endpoint

Enable mod_status and expose the status handler. On Debian and Ubuntu, enable the module:

sudo a2enmod status

Add the status handler to your Apache config (for example a file under conf-available/, or the relevant virtual host):

<Location "/server-status">
    SetHandler server-status
    Require local
</Location>

# Report per-request metrics such as CPU time and request duration.
ExtendedStatus On

Require local allows scrapes from the same host only. If the Collector runs on a different host, container, or pod, replace it with Require ip <collector-ip>. Reload Apache to apply the change (sudo systemctl reload apache2), then confirm the endpoint responds:

curl "http://localhost/server-status?auto"

For Docker and Kubernetes, apply the same directives to the Apache image or config you ship.

Step 2: Create the Collector config file

Create a file named apache-metrics-collection-config.yaml with the following content:

apache-metrics-collection-config.yaml
receivers:
  apache:
    endpoint: "${env:APACHE_STATUS_ENDPOINT}"
    collection_interval: 30s

processors:
  # sets service.name so Apache metrics are easy to filter in SigNoz
  resource/apache:
    attributes:
      - key: service.name
        value: apache
        action: upsert
  batch:
    send_batch_size: 10000
    send_batch_max_size: 11000
    timeout: 10s

exporters:
  # On Collector v0.144.0 and newer, use "otlp_http" to avoid a deprecation warning.
  otlphttp/apache:
    endpoint: "${env:OTLP_DESTINATION_ENDPOINT}"
    headers:
      "signoz-ingestion-key": "${env:SIGNOZ_INGESTION_KEY}"

service:
  pipelines:
    metrics/apache:
      receivers: [apache]
      processors: [resource/apache, batch]
      exporters: [otlphttp/apache]

Step 3: Deploy the Collector

Set the environment variables the config reads:

# Apache mod_status endpoint reachable from the collector
export APACHE_STATUS_ENDPOINT="http://localhost:80/server-status?auto"

# region specific SigNoz cloud ingestion endpoint
export OTLP_DESTINATION_ENDPOINT="https://ingest.<region>.signoz.cloud:443"

# your SigNoz ingestion key
export SIGNOZ_INGESTION_KEY="<your-ingestion-key>"

Start the Collector with the config file:

otelcol-contrib --config apache-metrics-collection-config.yaml

Verify these values:

Validate

After you start the Collector, confirm each signal arrives in SigNoz.

  1. Metrics: Open Metrics Explorer and search for metrics that start with apache. (for example apache.requests and apache.traffic).
  2. Logs: Open the Logs explorer and add filter service.name = apache.
Apache metrics in the SigNoz Metrics Explorer
Apache metrics in the SigNoz Metrics Explorer
Apache access and error logs in the SigNoz Logs explorer, filtered by service.name = apache
Apache logs in SigNoz, filtered by service.name = apache

Troubleshooting

No metrics arrive

  • Confirm curl "http://localhost/server-status?auto" returns the machine-readable status page. If it returns HTML or a 404, mod_status is not enabled or the /server-status handler is not configured.
  • If the Collector runs on a different host, container, or pod, confirm Require ip <collector-ip> allows it and that APACHE_STATUS_ENDPOINT points to a reachable address.
  • Metrics such as CPU time and request duration only appear when ExtendedStatus On is set.

No logs arrive

  • Confirm the Collector user can read the log files. Apache log directories are often restricted to root and the adm group.
  • Recheck APACHE_ACCESS_LOG_FILE and APACHE_ERROR_LOG_FILE against your distribution paths (/var/log/apache2/ on Debian/Ubuntu, /var/log/httpd/ on RHEL/CentOS/Fedora).
  • In Docker or Kubernetes, confirm the Collector mounts the same log volume Apache writes to.

Log fields are not parsed

  • The parsers assume the default Combined access format and the Apache 2.4 error format. A custom LogFormat or ErrorLogFormat breaks the regex. Update the regex in the matching receiver to fit your format.

No data at all

  • Recheck the OTLP_DESTINATION_ENDPOINT region against your SigNoz region. A wrong region drops data with no error.
  • Copy the signoz-ingestion-key value fresh from SigNoz settings.

Limitations

  • Metrics require mod_status. The apache receiver reads the /server-status?auto endpoint. Without it, no metrics are collected.
  • Default log formats assumed. The parsers target the default Combined access format and the Apache 2.4 error format. Custom formats need regex changes.
  • Access log severity is derived from HTTP status. 2xx and 3xx map to info, 4xx to warn, and 5xx to error.

Next Steps

Get Help

If you need help with the steps in this topic, please reach out to us on SigNoz Community Slack. If you are a SigNoz Cloud user, please use in product chat support located at the bottom right corner of your SigNoz instance or contact us at cloud-support@signoz.io.

Last updated: July 24, 2026

Edit on GitHub

Was this page helpful?

Your response helps us improve this page.