Apache Web Server receiver

The Apache Web Server receiver fetches stats from a Apache Web Server instance.

The Apache Web Server receiver fetches stats from an Apache Web Server instance using the server-status?auto endpoint. The supported pipeline type is metrics. See Process your data with pipelines for more information.

Prerequisites

  • This receiver supports Apache Web Server version 2.4 or higher.

  • In order to receive server statistics, you must configure the server’s httpd.conf file to enable status support. Learn more at https://httpd.apache.org/docs/2.4/mod/mod_status.html in Apache's official documentation.

Deploy the collector

See Deploy the Splunk Distribution of the OpenTelemetry Collector.

Configure the receiver

Edit your OpenTelemetry Collector configuration file as follows.

  1. Add apache to the receivers section of your configuration file.

    The following settings are required:

    • endpoint. "http://localhost:8080/server-status?auto" by default. The URL of the httpd status endpoint.

    The following settings are optional:

    • collection_interval. 10s by default. Sets the interval this receiver collects metrics on.

      • This value must be a string readable by Golang’s time.ParseDuration. Learn more at Go’s official documentation ParseDuration function .

      • Valid time units are ns, us (or µs), ms, s, m, h.

    • initial_delay. 1s by default. Determines how long this receiver waits before collecting metrics for the first time.

    YAML
    receivers:
      apache:
        endpoint: "http://localhost:8080/server-status?auto"
        collection_interval: 10s
  2. Configure other settings:

  3. Include the receiver in the metrics pipeline of the service section of your configuration file:

    YAML
    service:
      pipelines:
        metrics:
          receivers: [apache]

Restart the collector

To apply your configuration changes, restart the collector. The command to restart the Splunk Distribution of the OpenTelemetry Collector varies depending on what platform you deployed it on and what tool you used to deploy it, but here are general examples of the restart command:

  • Linux with installer script:

    CODE
    sudo systemctl restart splunk-otel-collector
  • Windows with installer script:

    CODE
    stop-service splunk-otel-collector
    start-service splunk-otel-collector
  • Kubernetes with Helm:

    CODE
    sudo systemctl restart splunk-otel-collector

Settings

The following table shows the configuration options for the Apache Web Server receiver:

included

https://raw.githubusercontent.com/splunk/collector-config-tools/main/cfg-metadata/receiver/apache.yaml

Metrics

The following metrics, resource attributes, and attributes are available.

Note: The SignalFx exporter excludes some available metrics by default. Learn more about default metric filters in List of metrics excluded by default.

included

https://raw.githubusercontent.com/splunk/collector-config-tools/main/metric-metadata/apachereceiver.yaml

Activate or deactivate specific metrics

You can activate or deactivate specific metrics by setting the enabled field in the metrics section for each metric. For example:

YAML
receivers:
  samplereceiver:
    metrics:
      metric-one:
        enabled: true
      metric-two:
        enabled: false

The following is an example of host metrics receiver configuration with activated metrics:

YAML
receivers:
  hostmetrics:
    scrapers:
      process:
        metrics:
          process.cpu.utilization:
            enabled: true
Note: Deactivated metrics aren’t sent to Splunk Observability Cloud.
Billing
  • If you’re in a MTS-based subscription, all metrics count towards metrics usage.

  • If you’re in a host-based plan, metrics listed as active (Active: Yes) on this document are considered default and are included free of charge.

Learn more at Infrastructure Monitoring subscription usage (Host and metric plans).

Troubleshooting

See Troubleshoot the Splunk OpenTelemetry Collector.