How to install & configure Datadog Integration with Apache HTTPD?

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

The following metrics will be tracked by this integration:

apache.conns_async_closingconnectionsThe number of asynchronous closing connections.
apache.conns_async_keep_aliveconnectionsThe number of asynchronous keep alive connections.
apache.conns_async_writingconnectionsThe number of asynchronous writes connections.
apache.conns_totalconnectionsThe total number of connections performed. total number of bytes served. number of bytes served per second. total number of requests performed. number of requests performed per second.
apache.performance.busy_workersthreadsThe number of workers serving requests.
apache.performance.cpu_loadpercentThe percent of CPU used.
apache.performance.idle_workersthreadsThe number of idle workers.
apache.performance.uptimesecondsThe amount of time the server has been running.

Step 1 – Install Datadog Agent in Centos OR Ubuntu OR Windows

Step 2 – Install Apache HTTPD server in Ubuntu OR Centos/Redhat OR Windows

Step 3 – Click on the Integrations using Left bar Navigations as shown below

Step 4 – Enable mod_status & ExtendedStatus in Apache

Step 5 – Enable Datadog Apache Integration configuration to start collecting your Apache metrics.

$ cd /etc/datadog-agent/conf.d/apache.d/
$ sudo cp conf.yaml.example conf.yaml
$ sudo vi conf.yaml (CHECK IMAGE BELOW)
$ sudo service datadog-agent restart [UBUNTU]
$ sudo systemctl restart datadog-agent [Centos and Ubuntu]


Step 6 – How to make sure if Datadog Agent is monitoring Apache

$ datadog-agent configcheck | grep apache -A 5 -B 5

=== apache check ===
Configuration provider: file
Configuration source: file:/etc/datadog-agent/conf.d/apache.d/conf.yaml
Config for instance ID: apache:9ad92079e09f96b4
apache_status_url: http://localhost/server-status?auto
disable_generic_tags: true

$ datadog-agent status | grep apache -B 5 -A 15

  Running Checks

    apache (4.2.2)
      Instance ID: apache:9ad92079e09f96b4 [OK]
      Configuration Source: file:/etc/datadog-agent/conf.d/apache.d/conf.yaml
      Total Runs: 17
      Metric Samples: Last Run: 27, Total: 459
      Events: Last Run: 0, Total: 0
      Service Checks: Last Run: 1, Total: 17
      Average Execution Time : 7ms
      Last Execution Date : 2023-09-07 03:47:33 UTC (1694058453000)
      Last Successful Execution Date : 2023-09-07 03:47:33 UTC (1694058453000)
        version.major: 2
        version.minor: 4
        version.patch: 41
        version.raw: 2.4.41
        version.scheme: semver

Step 7 – Click on “Install Integration” as show in image below; [ Obselete in Current version of Datadog ]

Step 7 – Create a fake Traffic on Apache

$ while true; do curl -s -o /dev/null http://localhost & done

Step 7 – Verify the Apache Metrix on Datadog Console

Rajesh Kumar
Follow me