Skip to content
BleemeoBleemeo

Apache HTTP

Auto-Detection
Health Check
Built-in Metrics
Logs
Tutorial availableMonitoring Apache Web Server with Bleemeo
Read the tutorial

Apache HTTP Server is the most widely deployed open-source web server.

Glouton detects Apache by its process and listening port (default: 80).

To enable metrics gathering, ensure Glouton can access the Apache status page at http://server-address/server-status?auto. This is enabled by default on Ubuntu and Debian. If not, add the following to your default virtual host (e.g. the first file in /etc/apache2/sites-enabled/):

LoadModule status_module /usr/lib/apache2/modules/mod_status.so
<Location /server-status>
SetHandler server-status
# You may want to limit access only to Bleemeo agent
# require ip IP-OF-BLEEMEO-AGENT/32
</Location>
ExtendedStatus On

When using Docker, you can set http_path and http_host via labels:

Terminal window
docker run --label glouton.http_path="/readiness" --label glouton.http_host="my-host" [...]

If auto-detected parameters are incorrect, override them manually:

Terminal window
sudo tee /etc/glouton/conf.d/99-apache.conf > /dev/null << 'EOF'
service:
# For an Apache running outside a container
- type: "apache"
address: "127.0.0.1"
port: 80 # HTTP listener, agent does not support HTTPS here
http_path: "/" # Path used for availability check, not metrics gathering
http_host: "127.0.0.1:80" # Host header sent
# For an additional Apache running outside a container
- type: "apache"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 81
http_path: "/"
http_host: "127.0.0.1:80"
# For an Apache running in a Docker container
- type: "apache"
instance: "CONTAINER_NAME"
address: "172.17.0.2"
port: 80
http_path: "/"
http_host: "127.0.0.1:80"
EOF

Glouton automatically detects configuration changes.

Glouton performs an HTTP check on the configured port and path to verify that Apache is responding.

MetricDescription
service_statusStatus of Apache
apache_busy_workersNumber of busy Apache workers
apache_busy_workers_percPercentage of busy Apache workers
apache_bytesNetwork traffic sent by Apache in bytes per second
apache_connectionsNumber of client connections to the Apache server
apache_idle_workersNumber of Apache workers waiting for an incoming request
apache_max_workersMaximum number of configured Apache workers
apache_requestsNumber of requests per second
apache_uptimeTime since Apache server start in seconds

Apache tracks server activity in a structure called the scoreboard. Each worker has a slot that holds its current status. The scoreboard size equals the maximum number of concurrent clients Apache can serve.

MetricDescription
apache_scoreboard_waitingNumber of workers waiting for an incoming request (same as apache_idle_workers)
apache_scoreboard_startingNumber of workers starting up
apache_scoreboard_readingNumber of workers reading an incoming request
apache_scoreboard_sendingNumber of workers processing a client request
apache_scoreboard_keepaliveNumber of workers waiting for another request via keepalive
apache_scoreboard_dnslookupNumber of workers looking up a hostname
apache_scoreboard_closingNumber of workers closing their connection
apache_scoreboard_loggingNumber of workers writing to log files
apache_scoreboard_finishingNumber of workers gracefully finishing a request
apache_scoreboard_idle_cleanupNumber of idle workers being killed
apache_scoreboard_openNumber of empty slots with no worker in the scoreboard

Apache does not start all workers when they are not needed – it reuses idle workers instead. The sum of all scoreboard items equals the maximum concurrent requests Apache can serve, stored in the apache_max_workers metric.

Glouton collects Apache HTTP access and error logs for analysis in Bleemeo.