The Apache integration allows you to monitor your Apache HTTP Server with the Atatus Infrastructure Agent. The agent reads metrics from the Apache server-status page and picks up the error and access logs from the same configuration file. Use this integration to:
  • Track request throughput such as requests per second and bytes served.
  • Monitor worker usage with the number of busy and idle workers.
  • Observe connections, CPU load, and server uptime.
  • Collect Apache error and access logs.

Setup

The Apache integration is bundled with the Atatus Infrastructure Agent. The agent polls Apache over HTTP, so the server-status page has to be reachable before any metric arrives. It comes from the mod_status module. On Debian and Ubuntu, enable the module with:
Then open /etc/apache2/mods-enabled/status.conf and make sure it exposes the status page:
Reload Apache to apply the change:
On RHEL, CentOS, and Amazon Linux, mod_status is loaded by default and the service is named httpd, so run sudo systemctl reload httpd instead.
Note the port Apache listens on, because the configuration below needs it.

Configuration

Metrics

Add the following configuration to /etc/atatus-infra-agent/conf.d/apache.d/apache.yml:
Check these before you save:
  • The port in hosts must be the port Apache listens on. 8080 is a placeholder, not a default Apache port.
  • metrics_path is the location of the status page. Keep server-status unless you exposed it at a different path.
  • username and password are only needed if you protect the status page with HTTP basic authentication. Remove both lines if you don’t.

Logs

Logs are configured in the same file as metrics. First, turn on log collection for the agent in /etc/atatus-infra-agent/atatus.yml:
Then add a logs section to /etc/atatus-infra-agent/conf.d/apache.d/apache.yml:
The two default types, error and access, pick up the standard Apache log paths. If your logs are in a different location, comment out the two default types and uncomment the entries below them. Then change paths to match your log files.

Verify Metrics

You can verify that the status page is reachable by calling it manually:
Replace 8080 with your Apache port. Add -u <USER>:<PASSWORD> if the page uses basic authentication.

Restart the Agent

After configuration, restart the Atatus Infrastructure Agent:

Metrics

These are the metrics the integration collects from the server-status page: