The Apache check tracks requests per second, bytes served, number of worker threads, service uptime, and more.
The Apache check is packaged with the Agent. To start gathering your Apache metrics and logs, you need to:
-
Install the Agent on your Apache servers.
-
Install
mod_statuson your Apache servers and enableExtendedStatus.
-
Edit the
apache.d/conf.yamlfile in theconf.d/folder at the root of your Agent's configuration directory to start collecting your Apache metrics and logs. See the sample apache.d/conf.yaml for all available configuration options.
-
Add this configuration block to your
apache.d/conf.yamlfile to start gathering your Apache Metrics: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 certsChange the
apache_status_urlparameter value and configure it for your environment. See the sample apache.d/conf.yaml for all available configuration options.
Available for Agent >6.0
-
Collecting logs is disabled by default in the Datadog Agent, you need to enable it in
datadog.yaml:logs_enabled: true
-
Add this configuration block to your
apache.d/conf.yamlfile to start collecting your Apache Logs:logs: - type: file path: /var/log/apache2/access.log source: apache sourcecategory: http_web_access service: apache - type: file path: /var/log/apache2/error.log source: apache sourcecategory: http_web_access service: apache
Change the
pathandserviceparameter values and configure them for your environment. See the sample apache.d/conf.yaml for all available configuration options.
Learn more about log collection in the log documentation.
Run the Agent's status subcommand and look for apache under the Checks section.
See metadata.csv for a list of metrics provided by this check.
The Apache check does not include any events.
apache.can_connect:
Returns CRITICAL if the Agent cannot connect to the configured apache_status_url, otherwise OK.
Additional helpful documentation, links, and articles:
