Apache HTTP
Agent uses a HTTP check if the service listen on port 80.
To enable metrics gathering, ensure Bleemeo agent could access Apache status on
the URL http://server-address/server-status?auto. This
should be done by default with Apache on Ubuntu or Debian. If not, this
usually means to 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 OnIf some auto-detected parameters are wrong, you can manually override them
by adding the following to /etc/glouton/conf.d/99-local.conf:
service: [...]
# For an Apache running outside a container - type: "apache" address: "127.0.0.1" port: 80 # HTTP listener, Agent don't support HTTPS here http_path: "/" # This is the path used for availability check, not metrics gathering. http_host: "127.0.0.1:80" # Host header sent. Like other option, you can omit them and default value will be used.
# 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 listener, Agent don't support HTTPS here http_path: "/" # This is the path used for availability check, not metrics gathering. http_host: "127.0.0.1:80" # Host header sent. Like other option, you can omit them and default value will be used.
# For an Apache running in a Docker container - type: "apache" instance: "CONTAINER_NAME" address: "172.17.0.2" port: 80 # HTTP listener, Agent don't support HTTPS here http_path: "/" # This is the path used for availability check, not metrics gathering. http_host: "127.0.0.1:80" # Host header sent. Like other option, you can omit them and default value will be used.When using Docker, you may use Docker labels to set http_path and http_host:
docker run --label glouton.http_path="/readiness" --label glouton.http_host="my-host" [...]Agent gathers the following metrics:
| Metric | Description |
|---|---|
| service_status | Status of Apache |
| apache_busy_workers | Number of Apache worker busy |
| apache_busy_workers_perc | Apache worker busy in percent |
| apache_bytes | Network traffic sent by Apache in bytes per second |
| apache_connections | Number of client connections to Apache server |
| apache_idle_workers | Number of Apache workers waiting for an incoming request |
| apache_max_workers | Maximum number of Apache worker configured |
| apache_requests | Number of requests per second |
| apache_uptime | Time spent since Apache server start in seconds |
Apache keeps track of server activity in a structure known as the scoreboard. There is a slot in the scoreboard for each worker and it contains the status of this worker. The size of the scoreboard is the maximum of concurrent users that Apache could server.
| Metric | Description |
|---|---|
| apache_scoreboard_waiting | Number of workers waiting for an incoming request. It’s the same as apache_idle_workers |
| apache_scoreboard_starting | Number of workers starting up |
| apache_scoreboard_reading | Number of workers reading an incoming request |
| apache_scoreboard_sending | Number of workers processing a client request |
| apache_scoreboard_keepalive | Number of workers waiting for another request via keepalive |
| apache_scoreboard_dnslookup | Number of workers looking up a hostname |
| apache_scoreboard_closing | Number of workers closing their connection |
| apache_scoreboard_logging | Number of workers writing in log files |
| apache_scoreboard_finishing | Number of workers gracefully finishing a request |
| apache_scoreboard_idle_cleanup | Number of idle workers being killed |
| apache_scoreboard_open | Number of slots with no worker in the scoreboard |
Apache do not start all workers when they are not needed (e.g. if there is enough workers waiting, Apache reuse them and don’t start a new one).
The sum of all scoreboard items is the maximum of concurrent requests Apache can serve. This sum is calculated and stored in apache_max_workers metric.