Our Apache integration sends performance metrics and inventory data from your Apache web server to the New Relic platform. You can view pre-built of your Apache metric data, create alert policies, and create your own custom queries and charts.
The integration works by gathering data from Apache's status module, so that module must be enabled and configured for your Apache instance (more details in Requirements).
Read on to install the integration, and to see what data we collect.
Compatibility and requirements
Our integration is compatible with Apache versions 2.2 or 2.4.
Before installing the integration, make sure that you meet the following requirements:
- A New Relic account. Don't have one? Sign up for free! No credit card required.
- Apache status module enabled and configured for Apache instance.
- Apache status module endpoint (default
server-status
) available from the host containing the Apache integration. - If Apache is not running on Kubernetes or Amazon ECS, you must have the infrastructure agent installed on a Linux OS host that's running Apache. Otherwise:
- If running on Kubernetes, see these requirements.
- If running on ECS, see these requirements.
Quick start
Instrument your Apache web server quickly and send your telemetry data with guided install. Our guided install creates a customized CLI command for your environment that downloads and installs the New Relic CLI and the infrastructure agent.
Ready to get started? Click one of these button to try it out.
Our guided install uses the infrastructure agent to set up the Apache integration. Not only that, it discovers other applications and log sources running in your environment and then recommends which ones you should instrument.
The guided install works with most setups. But if it doesn't suit your needs, you can find other methods below to get started monitoring your Apache web server.
Install and activate
To install the Apache integration, follow the instructions for your environment:
Additional notes:
- Advanced: Integrations are also available in tarball format to allow for install outside of a package manager.
- On-host integrations do not automatically update. For best results, regularly update the integration package and the infrastructure agent.
Did this doc help with your installation?
Configuration
Enabling your Apache server
To capture data from the Apache integration, you must first enable and configure the status module:
- Ensure the Apache status module is enabled and configured for Apache instance.
- Ensure the Apache status module endpoint (default
server-status
) is available from the host containing the Apache integration.
Configure the integration
There are several ways to configure the integration, depending on how it was installed:
- If enabled via Kubernetes: see Monitor services running on Kubernetes.
- If enabled via Amazon ECS: see Monitor services running on ECS.
- If installed on-host: edit the config in the integration's YAML config file,
apache-config.yml
.
An integration's YAML-format configuration is where you can place required login credentials and configure how data is collected. Which options you change depend on your setup and preference.
The configuration file has common settings applicable to all integrations, such as interval
, timeout
, inventory_source
. To read all about these common settings, refer to our Configuration Format document.
Important
If you are still using our legacy configuration/definition files, please refer to this document for help.
Specific settings related to Apache are defined using the env
section of the configuration file. These settings control the connection to your Apache instance as well as other security settings and features. The list of valid settings is described in the next section of this document.
Apache Instance Settings
The Apache integration collects both metrics(M) and inventory(I) information. In the table, use the Applies To column for the settings available to each collection:
Setting | Description | Default | Applies to |
---|---|---|---|
STATUS_URL | The URL set up to provide the metrics using the status module. | M/I | |
BINARY_PATH | Set location of the apache binary file. | N/A | I |
CA_BUNDLE_FILE | Alternative Certificate Authority bundle file. | N/A | M |
CA_BUNDLE_DIR | Alternative Certificate Authority bundle directory. | N/A | M |
VALIDATE_CERTS | Set to | true | M |
Enable multi-tenancy monitoring. | true | M/I | |
METRICS | Set to | false | |
INVENTORY | Set to | false |
The values for these settings can be defined in several ways:
- Adding the value directly in the config file. This is the most common way.
- Replacing the values from environment variables using the
{{}}
notation. This requires infrastructure agent v1.14.0+. Read more here or see the example below. - Using secrets management. Use this to protect sensitive information, such as passwords that would be exposed in plain text on the configuration file. For more information, see Secrets management.
Labels/Custom attributes
You can further decorate your metrics using labels. Labels allow you to add key/value pair attributes to your metrics, which you can then use to query, filter, or group your metrics on.
Our default sample config file includes examples of labels; however, as they are not mandatory, you can remove, modify, or add new ones of your choice.
labels: env: production role: load_balancer
Example configurations
Find and use data
Data from this service is reported to an integration dashboard.
Apache data is attached to the ApacheSample
event type. You can query this data for troubleshooting purposes or to create charts and dashboards.
For more on how to find and use your data, see Understand integration data.
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 |
---|---|
| 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
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 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 |
---|---|
| The version of the Apache server. Example: |
Troubleshooting
Check the source code
This integration is open source software. That means you can browse its source code and send improvements, or create your own fork and build it.