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 theserver-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:
/etc/apache2/mods-enabled/status.conf and make sure it exposes the status page:
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.Configuration
Metrics
Add the following configuration to/etc/atatus-infra-agent/conf.d/apache.d/apache.yml:
- The port in
hostsmust be the port Apache listens on.8080is a placeholder, not a default Apache port. metrics_pathis the location of the status page. Keepserver-statusunless you exposed it at a different path.usernameandpasswordare 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:
logs section to /etc/atatus-infra-agent/conf.d/apache.d/apache.yml:
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: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 theserver-status page: