spec(service-credential-tester): update prom test to gateway path
Dependency on grafana-metric-gateway: the prometheus service now sources via
Grafana /api/ds/query (no direct Prom endpoint). Test routine changes from
GET /api/v1/query?query=up to POST {grafana_url}/api/ds/query with api_key +
datasource_uid, expr 'up'.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user