Access to this feature depends on your subscription level. Requires Infrastructure Pro.
New Relic Infrastructure's on-host integrations include an Apache integration that instruments your Apache web server. This document explains how to install and configure the Apache integration, and describes the data collected.
New Relic's Apache integration sends performance metrics and inventory data from your Apache web server to New Relic products, including Infrastructure and Insights. You can view pre-built dashboards of your Apache metric data, create alert policies, and create your own custom queries and charts in Insights.
Compatibility and requirements
To use the Apache integration, ensure your system meets these requirements:
- New Relic Infrastructure installed on host
- Linux distribution compatible with New Relic Infrastructure
- Apache versions 2.2 or 2.4
- Apache status module enabled and configured for Apache instance
- Apache status module endpoint (default
server-status) available from host containing Apache integration
Install and activate
To install the Apache integration:
- Follow the instructions for installing an integration, using the file name
Via the command line, change directory to the integration's folder:
Create a copy of the sample configuration file by running:
sudo cp apache-config.yml.sample apache-config.yml
Edit the configuration file
apache-config.ymlusing the configuration settings described below.
- Restart the Infrastructure agent.
This integration can monitor only one Apache server instance per host.
The Apache integration's config file gives you control over how data is collected. Here are some values you may want to change:
metrics: This command captures the metrics of a particular Apache server. This takes a single argument:
status_url: The URL set up to provide the metrics using the Apache status info module. Default value:
http://127.0.0.1/server-status?auto. If you have customized your setup to use a different endpoint, you will need to set this value.
inventory: This command captures the modules loaded by Apache as inventory data, using Apache's binary file. To disable the collection of inventory data, delete the inventory command from the config file.
envlabel controls the
environmentattribute in Insights. The default value is
For general information about the config file structure, see the SDK documentation.
Here are some potential configuration issues and troubleshooting tips:
- Problem accessing HTTPS endpoint for Apache
If you are having issues accessing the HTTPS endpoint for Apache, here are two possible solutions:
Although you cannot ignore the SSL certification, you can set the config file parameters
ca_bundle_dirto point to an unsigned certificate in the Apache config file. Example:
instances: - name: apache-server-metrics command: metrics arguments: status_url: http://127.0.0.1/server-status?auto ca_bundle_file: /etc/newrelic-infra/integrations.d/ssl/b2b.ca-bundle
An example using
- Alternatively, you can use HTTP instead of HTTPS.
Find and use data
To find your integration data in Infrastructure, go to infrastructure.newrelic.com > Integrations > On-host integrations and select one of the Apache integration links.
For more on how to find and use your data, see Understand integration data.
The Apache integration collects the following metric data attributes. Each metric name is prefixed with a category indicator and a period, such as
||Rate of the number of bytes served, in bytes per second.|
||Rate of the number of client requests, in requests per second.|
||Current number of busy workers.|
||Current number of idle workers.|
||Current number of workers closing TCP connection after serving the response.|
||Current number of workers performing a DNS lookup.|
||Current number of workers gracefully finishing.|
||Current number of idle workers ready for cleanup.|
||Current number of workers maintaining a keep-alive connection.|
||Current number of workers that are logging.|
||Current number of workers reading requests (headers or body).|
||Current number of workers that are starting up.|
||Total number of workers available. Workers that are not needed to process requests may not be started.|
||Current number of workers that are writing.|
Inventory data captures the version numbers from running Apache and from all loaded Apache modules, and adds those version numbers under the
config/apache namespace. For more about inventory data, see Understand integration data.
Besides the standard attributes collected by the Infrastructure agent, the integration collects inventory data associated with the
ApacheSample Insights event type:
||The version of the Apache server. Example: