Datadog-Apache Integration

Overview

The Apache check tracks requests per second, bytes served, number of worker threads, service uptime, and more.

Setup

Installation

The Apache check is packaged with the Agent, so simply install the Agent on your Apache servers.

Install mod_status on your Apache servers and enable ExtendedStatus.

Configuration

Create a file apache.yaml in the Agent’s conf.d directory. See the sample apache.yaml for all available configuration options:

init_config:

instances:
  - apache_status_url: http://example.com/server-status?auto
#   apache_user: example_user # if apache_status_url needs HTTP basic auth
#   apache_password: example_password
#   disable_ssl_validation: true # if you need to disable SSL cert validation, i.e. for self-signed certs

Restart the Agent to start sending Apache metrics to Datadog.

Validation

Run the Agent’s info subcommand and look for apache under the Checks section:

  Checks
  ======
    [...]

    apache
    -------
      - instance #0 [OK]
      - Collected 26 metrics, 0 events & 1 service check

    [...]

Compatibility

The Apache check is compatible with all major platforms.

Data Collected

Metrics

apache.conns_total
(gauge)
The total number of connections performed.
shown as connection
apache.conns_async_writing
(gauge)
The number of asynchronous writes connections.
shown as connection
apache.conns_async_keep_alive
(gauge)
The number of asynchronous keep alive connections.
shown as connection
apache.conns_async_closing
(gauge)
The number of asynchronous closing connections.
shown as connection
apache.net.bytes
(gauge)
The total number of bytes served.
shown as byte
apache.net.bytes_per_s
(gauge)
The number of bytes served per second.
shown as byte
apache.net.hits
(gauge)
The total number of requests performed.
shown as request
apache.net.request_per_s
(gauge)
The number of requests performed per second.
shown as request
apache.performance.cpu_load
(gauge)
The percent of CPU used.
shown as percent
apache.performance.busy_workers
(gauge)
The number of workers serving requests.
shown as thread
apache.performance.idle_workers
(gauge)
The number of idle workers.
shown as thread
apache.performance.uptime
(gauge)
The amount of time the server has been running.
shown as second

Events

The Apache check does not include any event at this time.

Service Checks

apache.can_connect:

Returns CRITICAL if the Agent cannot connect to the configured apache_status_url, otherwise OK.

Troubleshooting

Need help? Contact Datadog Support.

Further Reading