Skip to content

Squid3

Auto-Detection
Health Check
Exporter Metrics

Bleemeo monitors the Squid HTTP caching proxy through automatic service detection, HTTP health checks, and optional detailed metrics collection via a Prometheus exporter.

Glouton automatically detects Squid instances running on the host. If the auto-detected parameters are incorrect, you can override them manually by adding the following to /etc/glouton/conf.d/99-squid.conf:

service:
# For a Squid running outside a container
- type: "squid"
address: "127.0.0.1"
port: 3128
http_path: "/" # Path used for the availability check
http_host: "127.0.0.1:80" # Host header sent with the check
# For an additional Squid running outside a container
- type: "squid"
instance: "NAME_ASSOCIATED_WITH_YOUR_ADDITIONAL_SERVICE"
address: "127.0.0.1"
port: 3129
http_path: "/"
http_host: "127.0.0.1:81"
# For a Squid running in a Docker container
- type: "squid"
instance: "CONTAINER_NAME"
address: "172.17.0.2"
port: 3128
http_path: "/"
http_host: "127.0.0.1:80"

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

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

Glouton performs an HTTP health check when the service listens on port 3128.

Metric Description
service_status Status of Squid3

Detailed Squid metrics are collected using the third-party squid-exporter.

  • Squid caching proxy installed and running
  • Glouton agent installed on the same host
  • Squid cache manager accessible on localhost (default port 3128)

Ensure the Squid cache manager is accessible from localhost. In your Squid configuration (/etc/squid/squid.conf), verify that the following ACL allows local access:

http_access allow localhost manager

This is typically enabled by default.

Download the latest release from the squid-exporter releases page.

Start the exporter:

Terminal window
squid-exporter -squid-hostname localhost -squid-port 3128

The exporter listens on port 9301 by default. Verify it is working:

Terminal window
curl http://localhost:9301/metrics

For production use, create a systemd service unit to manage the exporter process.

Terminal window
sudo tee /etc/glouton/conf.d/99-squid.conf > /dev/null << 'EOF'
metric:
prometheus:
targets:
- url: "http://localhost:9301/metrics"
name: "squid"
allow_metrics:
- "squid_up"
- "squid_client_http_requests_total"
- "squid_client_http_hits_total"
- "squid_server_all_requests_total"
- "squid_DNS_lookups_total"
EOF
Metric Description
squid_up Whether the Squid cache manager is reachable (1 = up)
squid_client_http_requests_total Total number of client HTTP requests
squid_client_http_hits_total Total number of client HTTP cache hits
squid_server_all_requests_total Total number of requests forwarded to origin servers
squid_DNS_lookups_total Total number of DNS lookups performed