ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 10m23s
ci / test (pull_request) Successful in 12m59s
ci / build (pull_request) Canceled after 7m17s
ci / image (pull_request) Canceled after 0s
The API serves Prometheus metrics on a listener of its own (UPTIME_API_METRICS_LISTEN, default :9090, "off" disables it), so the public ingress never exposes them: - requests by route and status, with durations except for long polls and agent streams - dispatched checks, stored and rejected results per region, how late results arrive, live checkers and overdue checks per platform region - notification and subscriber mail deliveries, incidents opened and resolved - runs, duration and last success of the background jobs - platform totals (orgs, users, monitors by type, status pages, subscribers, open incidents, pending notifications), read at most every 15 seconds when scraped - the Postgres and Redis connection pools, Go runtime and build info The Helm chart exposes the port on the API service and can add a ServiceMonitor for the Prometheus Operator. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
18 lines
884 B
SQL
18 lines
884 B
SQL
-- name: PlatformCounts :one
|
|
-- System scope. Platform totals for the operator metrics.
|
|
SELECT
|
|
(SELECT count(*) FROM orgs)::bigint AS orgs,
|
|
(SELECT count(*) FROM users)::bigint AS users,
|
|
(SELECT count(*) FROM status_pages)::bigint AS status_pages,
|
|
(SELECT count(*) FROM status_page_subscribers WHERE confirmed_at IS NOT NULL)::bigint AS subscribers,
|
|
(SELECT count(*) FROM incidents WHERE resolved_at IS NULL)::bigint AS open_incidents,
|
|
(SELECT count(*) FROM notifications WHERE status = 'pending')::bigint AS pending_notifications,
|
|
(SELECT count(*) FROM subscriber_notifications WHERE status = 'pending')::bigint AS pending_subscriber_notifications;
|
|
|
|
-- name: MonitorCounts :many
|
|
-- System scope. Monitors by type and whether they are enabled.
|
|
SELECT type, enabled, count(*)::bigint AS monitors
|
|
FROM monitors
|
|
GROUP BY type, enabled
|
|
ORDER BY type, enabled;
|