Commands
1. Create a read-only service-account token
In groundcover: Settings → Access → Service Accounts → create a service account with a read-only policy → create an API key and copy it (shown once). OpenSRE never performs write actions.2. Configure
Run the interactive setup:opensre integrations list shows integrations saved to the local store (via
setup); environment-variable configuration is still picked up by verify and
at runtime.
3. Verify
passed, missing
(token not configured), or failed with an actionable message — for example,
naming the missing or mistyped GROUNDCOVER_TENANT_UUID / GROUNDCOVER_BACKEND_ID
when the account is ambiguous. Tokens are never printed.
Tools
Writing efficient gcQL
gcQL is a pipe-based language: a query starts with a filter (or*) and pipes
through operators. These rules keep queries fast and valid:
- Lead with the filter directly —
level:error | …, not* | filter level:error. The| filterpipe is for post-aggregation conditions on computed aliases. - Project or aggregate — don’t pull raw rows blindly. Use
| fields a, b, …to select columns, or| stats …to aggregate. A bare select-all (<filter> | limit N) can be rejected by the backend. - Keep the time window narrow. The default is the last 1 hour; widen only after an empty or inconclusive result.
- Always include
| limit N— it caps rows returned (not data scanned), so for wide ranges preferstats/aggregations. - Discover fields with
* | field_names(orget_groundcover_query_reference).