The OpenTelemetry Collector provides an integration with Apache to ingest metrics. The Collector fetches metrics from the configured path in the Apache receiver. From there the metrics are processed and exported to Lightstep Observability.

To complete the integration, you will:

  • Configure Apache to report metrics to the OpenTelemetry Collector
  • Configure the Apache receiver for the Collector
  • Enable the integration by adding it to a pipeline

Prerequisites

  • Apache v2.4 or later
  • You’ve configured the Collector to export metric data to Lightstep Observability.

Configure Apache reporting

Apache emits metrics using the mod_status module that provides an endpoint with information about the state of the server. To enable the status endpoint for Apache, load the mod_statusmodule into your httpd.conf file using the following directive::

1
LoadModule status_module modules/mod_status.so

By default, httpd.conf is used for configuring these parameters, but Apache also supports files. Depending on your setup, this module may need to go in another location.

Additionally, access to the server status endpoint is restricted and additional configuration is required to ensure the OpenTelemetry Collector can access the endpoint. Add the following location object to your httpd-info.conf file:

1
2
3
4
<Location /server-status>
	SetHandler server-status
	Require host <OpenTelemetry Collector host>
</Location>

For more details regarding configuring the Apache remote connection, see the official Apache documentation.

Configure the Collector receiver

In the Collector configuration file, add Apache as a receiver and set the endpoint to address of the Apache server.

1
2
3
receivers:
  apache:
      endpoint: "http://<address of server>:<port>/server-status?auto"

The OpenTelemetry repo’s readme provides additional details about Apache configuration.

Enable the Collector receiver

Once the Apache receiver is configured, enable it by adding it to one or more pipelines as described in the Collector configuration documentation.

Validate metrics are reporting to Lightstep

You can validate that the metrics are reporting to Lightstep from the Metric details section of the Project Settings page.

  1. Open the Project settings page and scroll to the Metric details section.

  2. Search for Apache metric names. Search for metric

    See the receiver’s metadata file for a complete list of emitted metrics.

  3. If needed, click on the metric to edit the description and how the units are displayed in Lightstep.

Create a dashboard for the metrics

Use the Lightstep Terraform Provider to create a dashboard for the metrics.

Additional resources

For a more complete example that’s ready to run, see the Apache integration in Lightstep OpenTelemetry Examples.