Apache

Monitor server status, request rates, total traffic, and worker utilization from your local Apache HTTP server. The agent probes the Apache mod_status module to collect real-time performance data, helping you identify load patterns and resource constraints.

Setup

Preparing Apache for monitoring requires enabling and configuring the mod_status module so the agent can probe it locally.

  1. Enable the status module: Ensure mod_status is enabled in your Apache configuration. Most modern distributions enable this by default.

  2. Configure the status handler: Add or modify a configuration block (often in mods-enabled/status.conf) to expose the status page. You must set ExtendedStatus On to collect detailed metrics like request rates and bytes per second.

    <Location "/server-status">
        SetHandler server-status
        Require local
    </Location>
    ExtendedStatus On
  3. Restart Apache: Validate your configuration and restart the service: sudo apachectl configtest && sudo systemctl restart apache2.

  4. Restart the agent: Restart simob to trigger service discovery for the new endpoint: sudo systemctl restart simob.

  5. Enable in UI: Once discovered, explicitly enable the Apache collector in your dashboard.

Configuration

The agent automatically discovers the Apache status page if it is exposed on http://localhost/server-status?auto. No additional configuration is required for standard installations.

Metrics

The following metrics are collected from the Apache server status page:

MetricTypeUnitDescription
apache_requests_totalGaugereqsTotal number of client requests processed.
apache_requests_rateGaugereqs/sAverage number of requests per second.
apache_bytes_totalGaugebytesTotal volume of traffic served in bytes.
apache_bytes_bpsGaugebytes/sAverage traffic rate in bytes per second.
apache_workers_busy_totalGauge-Number of workers currently processing requests.
apache_workers_idle_totalGauge-Number of idle workers available for requests.
apache_connections_totalGauge-Total number of active connections.
apache_connections_writing_totalGauge-Number of connections in the writing state.
apache_connections_keepalive_totalGauge-Number of connections in the keep-alive state.
apache_connections_closing_totalGauge-Number of connections in the closing state.

Troubleshooting

Verify the endpoint

Test locally using curl to ensure Apache is correctly exposing statistics in the machine-readable format expected by the agent:

curl http://localhost/server-status?auto

ExtendedStatus requirement

If metrics like apache_requests_rate or apache_bytes_bps are missing, ensure that ExtendedStatus On is explicitly set in your Apache configuration and that the server has been restarted.