Commands
| Command | What it does |
|---|---|
opensre integrations setup groundcover | Store a groundcover service-account token and routing settings |
opensre integrations verify groundcover | Connect to the MCP endpoint, list tools, and check workspace routing |
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
| Tool | Use it for |
|---|---|
get_groundcover_query_reference | The gcQL syntax reference — call once before writing queries |
query_groundcover_logs | Application errors, exceptions, and log events |
query_groundcover_traces | Slow/failing spans and request correlations |
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).
Troubleshooting
| Symptom | Fix | ||
|---|---|---|---|
missing on verify | Set GROUNDCOVER_API_KEY (or GROUNDCOVER_MCP_TOKEN). | ||
401 Unauthorized | Regenerate the service-account token; ensure it has read access. | ||
Account has N workspaces… | Set GROUNDCOVER_TENANT_UUID to the listed tenant. | ||
…has N backends… | Set GROUNDCOVER_BACKEND_ID to the listed backend. | ||
failed to query … | Project with ` | fields …or aggregate with | stats …`; narrow the time window; avoid a bare raw select-all. |
| Empty results | Run `* | field_names` to find real field names; avoid leading-wildcard globs. | |
Not shown in integrations list | list shows the local store — run opensre integrations setup groundcover (env vars still work for verify/runtime). |
Tracer