diff --git a/openspec/changes/service-credential-tester/proposal.md b/openspec/changes/service-credential-tester/proposal.md index df1f78b..f0a2d80 100644 --- a/openspec/changes/service-credential-tester/proposal.md +++ b/openspec/changes/service-credential-tester/proposal.md @@ -38,7 +38,7 @@ The same tester is reachable from the service page as a "Re-test" action for alr - **Backend:** a new endpoint `POST /api/services/test` that accepts `{service_type, config, secrets}` (NOT a service id — the tester works on unsaved input), dispatches to a per-type test routine, and returns `{ok: bool, detail: str, evidence?: str}`. The dispatch registry is closed and compile-time (mirrors `SERVICE_DEFINITIONS`). - **Per-type test routines** (minimal, read-only): - **qbittorrent:** login via `/api/v2/auth/login`, then `GET /api/v2/sync/maindata` (or `/app/version`). Evidence: qBittorrent version. - - **prometheus:** `GET /api/v1/query?query=up` (or `/api/v1/status/buildinfo`). Evidence: Prometheus version. + - **prometheus:** `POST {grafana_url}/api/ds/query` with the configured `grafana_api_key` + `datasource_uid`, body querying `expr: "up"`. Evidence: gateway reachable + datasource responding (the `prometheus` service now sources through Grafana per the `grafana-metric-gateway` change; there is no direct Prom endpoint to test). - **alertmanager:** `GET /api/v2/alerts` (or `/api/v2/status`). Evidence: cluster version. - **jellyfin:** `GET /Users` (already exposed by `JellyfinClient.users()`). Evidence: user count + server name. - **jellyseerr:** (if still present as a distinct type) `GET /user`. Evidence: count.