Apache monitoring integration

Our Apache integration reports data from your Apache web server to the New Relic platform. You can view dashboards of your Apache metric data, create alert policies, and create your own custom queries and charts.

To get the most out of this page, select the installation method that fits your environment. You need a New Relic account before starting the installation process.

Tip

Use guided install to quickly see your data in the UI

The guided install is a single CLI command you can run to monitor your instance. It's a good option for small organizations, or for anyone who wants to test out New Relic.

For a more permanent and scalable solution, we recommend the standard manual install of the agent: keep reading for how to do that.

Choose your framework

Choose your install path

Check the compatibility and requirements

Before installation, ensure you meet these requirements:

  • A New Relic account. Don't have one? Sign up for free! No credit card required.
  • Apache versions 2.2 and 2.4
  • Apache status module enabled and configured for Apache instance.
  • Apache status module endpoint (default server-status) available from the host containing the Apache integration.

Install the infrastructure agent

To use the Apache integration, you need to also install the infrastructure agent on the same host. The infrastructure agent monitors the host itself, while the integration you'll install in the next step extends your monitoring with specific data such as database and instance metrics.

Download using APT

  1. From the command line, run these commands:

    bash
    $
    sudo apt-get update
  2. Run the following command:

    bash
    $
    sudo apt-get install nri-apache

Configure the integration

  1. Change directory to the integrations configuration folder by running:

    bash
    $
    cd /etc/newrelic-infra/integrations.d
  2. Copy the sample configuration file by running:

    bash
    $
    sudo cp nri-apache-config.yml.sample nri-apache-config.yml
  3. Edit the nri-apache-config.yml file. The only two required fields are _cluster_name and _uri. This example config file collects all metrics:

    integrations:
    - name: nri-apache
    env:
    METRICS: "true"
    STATUS_URL: http://127.0.0.1/server-status?auto
    REMOTE_MONITORING: true
    interval: 15s
    labels:
    env: production
    role: load_balancer
    - name: nri-apache
    env:
    INVENTORY: "true"
    STATUS_URL: http://127.0.0.1/server-status?auto
    REMOTE_MONITORING: true
    interval: 60s
    labels:
    env: production
    role: load_balancer
    inventory_source: config/apache

You can find all the config options at the bottom of this doc along with more complex config examples.

Find and use data

Data from this integration can be found by going to: one.newrelic.com > Infrastructure > Third-party services > Apache.

Apache data is attached to the ApacheSample event type. You can query this data for troubleshooting purposes or to create custom charts and dashboards.

For more on how to find and use your data, see Understand integration data.

Apache configuration options

The Apache integration collects both metrics and inventory information. This table provides a description for each config setting and whether it applies to metrics, inventory, or both.

Setting

Description

Default

Applies to

STATUS_URL

The URL set up to provide the metrics using the status module.

http://127.0.0.1/server-status?auto

Metrics, inventory

REMOTE_MONITORING

Enable multi-tenancy monitoring.

true

Metrics, inventory

BINARY_PATH

Set location of the Apache binary file.

[None]

Inventory

CA_BUNDLE_FILE

Alternative certificate authority bundle file.

[None]

Metrics

CA_BUNDLE_DIR

Alternative certificate authority bundle directory.

[None]

Metrics

VALIDATE_CERTS

Set to false if the status URL is HTTPS with a self-signed certificate.

true

Metrics

METRICS

Set to true to enable metrics-only collection.

false

INVENTORY

Set to true to enable inventory-only collection.

false

Example configurations

Here are some example YAML configurations:

Labels

You can further decorate your metrics using labels. Labels allow you to add attributes (key/value pairs) to your metrics, which you can then use to query, filter, or group your metrics.

Our default sample config file includes examples of labels but, because they're not mandatory, you can remove, modify, or add new ones of your choice. The following example adds the attribute 'production:load_balancer' to reported metrics.

labels:
env: production
role: load_balancer

Metric data

The Apache integration collects the following metric data attributes. Each metric name is prefixed with a category indicator and a period, such as net. or server..

Name

Description

net.bytesPerSecond

Rate of the number of bytes served, in bytes per second.

net.requestsPerSecond

Rate of the number of client requests, in requests per second.

server.busyWorkers

Current number of busy workers.

server.idleWorkers

Current number of idle workers.

server.scoreboard.closingWorkers

Current number of workers closing TCP connection after serving the response.

server.scoreboard.dnsLookupWorkers

Current number of workers performing a DNS lookup.

server.scoreboard.finishingWorkers

Current number of workers gracefully finishing.

server.scoreboard.idleCleanupWorkers

Current number of idle workers ready for cleanup.

server.scoreboard.keepAliveWorkers

Current number of workers maintaining a keep-alive connection.

server.scoreboard.loggingWorkers

Current number of workers that are logging.

server.scoreboard.readingWorkers

Current number of workers reading requests (headers or body).

server.scoreboard.startingWorkers

Current number of workers that are starting up.

server.scoreboard.totalWorkers

Total number of workers available. Workers that are not needed to process requests may not be started.

server.scoreboard.writingWorkers

Current number of workers that are writing.

Inventory data

Inventory data captures the version numbers from running Apache and from all loaded Apache modules. Those version numbers are added under the config/apache namespace. For more about inventory data, see Understand data.

System metadata

Besides the standard attributes collected by the infrastructure agent, the integration collects inventory data associated with the ApacheSample event type:

Name

Description

software.version

The version of the Apache server. Example: Apache/2.4.7 (Ubuntu).

Troubleshooting