Skip to content

Monitoring

Endpoint Meaning
GET /healthz Liveness: the process is serving (ok).
GET /readyz Readiness: Postgres is reachable (ready), otherwise 503 database unavailable.

The Helm chart wires them up as readiness (/readyz), liveness and startup (/healthz) probes. entrepot scan-worker serves the same two endpoints on -health-addr / ENTREPOT_SCAN_WORKER_ADDR.

GET /metrics exposes Prometheus metrics without authentication. Per-repository metrics carry repository names, so block /metrics at your ingress if repository names are sensitive and scrape the Service from inside the cluster. With the Prometheus Operator, enable the chart’s ServiceMonitor:

metrics:
serviceMonitor:
enabled: true
interval: 30s
labels: {release: kube-prometheus-stack}
Metric Type Labels
entrepot_http_requests_total counter area (api, repository, docker, auth, ui, system), method, code
entrepot_http_request_duration_seconds histogram area
entrepot_repository_requests_total counter repository, format, status (status class)
entrepot_repository_download_bytes_total counter repository, format
entrepot_repository_upload_bytes_total counter repository, format
entrepot_proxy_cache_total counter repository, result (hit, miss)

The per-repository metrics come with the usage metrics dashboard. The standard Go and process metrics (go_*, process_*) are exported too.

Useful queries:

# request rate by area
sum by (area) (rate(entrepot_http_requests_total[5m]))
# 5xx ratio
sum(rate(entrepot_http_requests_total{code=~"5.."}[5m])) / sum(rate(entrepot_http_requests_total[5m]))
# p95 latency of package endpoints
histogram_quantile(0.95, sum by (le) (rate(entrepot_http_request_duration_seconds_bucket{area=~"repository|docker"}[5m])))
# proxy cache hit ratio per repository
sum by (repository) (rate(entrepot_proxy_cache_total{result="hit"}[1h]))
/ sum by (repository) (rate(entrepot_proxy_cache_total[1h]))

Suggested alerts: /readyz failing, a rising 5xx ratio (often an unreachable upstream: proxies answer 502 when they have nothing cached), and a growing failed scan-job count (GET /api/v1/scan-jobs?status=failed).

Logs go to stderr as JSON (log.format: json, or text) at log.level (info by default). Each non-trivial request is logged with method, path, status, bytes, duration and remote address; health checks, metrics and successful UI asset requests are not. Upstream failures are logged as upstream error with the upstream status.

Every administrative change, login and cleanup run is recorded with the actor, action, target, details and remote IP. Read it in the UI (Administration → Audit log) or through the API:

Terminal window
curl -fsS -H "Authorization: Bearer $ADMIN" "https://entrepot.example.com/api/v1/audit-events?limit=50"
# older pages: ?before=<id of the last event>

CI jobs appear as gitlab:<project_path>@<ref>#<job_id>, service accounts as sa:<name>.