Squid3
Bleemeo monitors the Squid HTTP caching proxy through automatic service detection, HTTP health checks, and optional detailed metrics collection via a Prometheus exporter.
Auto-Detection
Section titled “Auto-Detection”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" [...]Health Check
Section titled “Health Check”Glouton performs an HTTP health check when the service listens on port 3128.
| Metric | Description |
|---|---|
service_status | Status of Squid3 |
Exporter Metrics
Section titled “Exporter Metrics”Detailed Squid metrics are collected using the third-party squid-exporter.
Prerequisites
Section titled “Prerequisites”- Squid caching proxy installed and running
- Glouton agent installed on the same host
- Squid cache manager accessible on localhost (default port 3128)
Service Configuration
Section titled “Service Configuration”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 managerThis is typically enabled by default.
Installing the Exporter
Section titled “Installing the Exporter”Download the latest release from the squid-exporter releases page.
Start the exporter:
squid-exporter -squid-hostname localhost -squid-port 3128The exporter listens on port 9301 by default. Verify it is working:
curl http://localhost:9301/metricsFor production use, create a systemd service unit to manage the exporter process.
Glouton Configuration
Section titled “Glouton Configuration”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"EOFCreate or edit C:\ProgramData\glouton\conf.d\99-squid.conf:
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"| 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 |