[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-grafana-setup-gcx":3,"mdc-oeiawr-key":34,"related-org-grafana-setup-gcx":3554,"related-repo-grafana-setup-gcx":3740},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"setup-gcx","configure gcx for Grafana instances","Sets up gcx: installation, context creation, authentication, and connection to a Grafana instance. Covers Grafana Cloud and on-premise deployments, environment variable overrides for CI\u002FCD, default datasource configuration, and troubleshooting connection and authentication problems. Use when installing gcx, connecting gcx to a Grafana instance for the first time, or when gcx commands fail with auth or connectivity errors (401, 403, connection refused, missing namespace).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"grafana","Grafana","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fgrafana.jpg",[12,16,19,22],{"name":13,"slug":14,"type":15},"Configuration","configuration","tag",{"name":17,"slug":18,"type":15},"CLI","cli",{"name":20,"slug":21,"type":15},"Deployment","deployment",{"name":9,"slug":8,"type":15},430,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx","2026-07-25T05:30:43.279807",null,29,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"A CLI for managing Grafana Cloud resources. Optimized for agentic usage.","https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx\u002Ftree\u002FHEAD\u002Fclaude-plugin\u002Fskills\u002Fsetup-gcx","---\nname: setup-gcx\ndescription: >\n  Sets up gcx: installation, context creation, authentication, and connection\n  to a Grafana instance. Covers Grafana Cloud and on-premise deployments,\n  environment variable overrides for CI\u002FCD, default datasource configuration,\n  and troubleshooting connection and authentication problems. Use when\n  installing gcx, connecting gcx to a Grafana instance for the first time, or\n  when gcx commands fail with auth or connectivity errors (401, 403,\n  connection refused, missing namespace).\n---\n\n# Setup gcx\n\nThree configuration paths: Grafana Cloud (Path A), on-premise (Path B), and\nenvironment variables for CI\u002FCD (Path C). For the complete config reference\n(all `config set` paths, TLS options, namespace resolution rules, multi-context\npatterns), see [configuration.md](references\u002Fconfiguration.md).\n\n## Step 0: Install gcx\n\nFirst, check whether gcx is already installed:\n\n```bash\ngcx --version\n```\n\nIf the command is not found, build it from source. Requires\n[git](https:\u002F\u002Fgit-scm.com\u002F) and a recent [Go](https:\u002F\u002Fgo.dev\u002F) toolchain:\n\n```bash\ntmp=$(mktemp -d) && git clone --depth 1 https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx.git \"$tmp\" && (cd \"$tmp\" && go install .\u002Fcmd\u002Fgcx) && rm -rf \"$tmp\"\n```\n\nAfter installing, verify the binary is on PATH:\n\n```bash\ngcx --version\n```\n\n## Configuration Model\n\ngcx uses a context-based configuration model inspired by kubectl's\nkubeconfig. One or more layered YAML files (with the user file at\n`~\u002F.config\u002Fgcx\u002Fconfig.yaml` by default)\nstore named `stacks` (Grafana destination, credentials, provider config), named\n`cloud` entries (Grafana Cloud platform credentials and endpoints), and thin\n`contexts` that reference a stack and optional Cloud entry. One context is\nselected at a time; all commands operate against it unless overridden.\nSingle-source legacy configs are migrated automatically after a safe preflight.\nWhen several layers participate, gcx converts them in memory and asks the user\nto migrate each layer explicitly rather than partially persisting the result.\n\nUse `gcx config view` to inspect the current configuration at any time.\nUse `gcx config check` to validate that the active context is correct\nand can reach the server.\n\n---\n\n## Path A: Grafana Cloud\n\nUse this path when connecting to a Grafana Cloud instance\n(URLs ending in `.grafana.net`).\n\n### Step 1: Create a stack and context\n\n```bash\ngcx config set stacks.cloud.grafana.server https:\u002F\u002Fmyorg.grafana.net\ngcx config set contexts.cloud.stack cloud\n```\n\nReplace `cloud` with any name you prefer (e.g., `prod`, `myorg-cloud`).\nReplace the server URL with your Grafana Cloud URL. The first command creates\nthe stack entry; the second creates a context pointing at it.\n\n### Step 2: Authenticate\n\n**Option A-1: Browser OAuth (recommended for Grafana Cloud)**\n\n```bash\ngcx login cloud --server https:\u002F\u002Fmyorg.grafana.net --oauth\n```\n\nOpens a browser for the user to approve. This works non-interactively and in\nagent mode — the agent issues the command, the browser opens, and the user\napproves. No token to create or paste. `gcx login` also sets the context as\ncurrent and verifies connectivity, so Steps 1, 3, and 4 are handled for you;\nskip them when using this option.\n\n**Option A-2: Service account token**\n\n```bash\ngcx config set stacks.cloud.grafana.token glsa_XXXXXXXXXXXXXXXX\n```\n\nObtain a service account token from **Administration > Service accounts** in\nyour Grafana Cloud instance. The token must have sufficient permissions for the\noperations you intend to run (Viewer for read-only, Editor or Admin for write\noperations).\n\nThe `grafana.token` field takes precedence over `grafana.user`\u002F`grafana.password`\nwhen both are present.\n\nGrafana Cloud product APIs use a separate credential. A Cloud Access Policy\ntoken has the widest compatibility and can be supplied during unified login:\n\n```bash\ngcx login cloud --server https:\u002F\u002Fmyorg.grafana.net \\\n  --token glsa_XXXXXXXXXXXXXXXX --cloud-token glc_XXXXXXXXXXXXXXXX --yes\n```\n\nFor interactive use, the Cloud step of `gcx login` can keep an existing CAP or\nunexpired OAuth credential, accept a CAP, run the experimental direct Cloud\nOAuth flow, or skip. `gcx cloud login --context cloud` runs direct Cloud OAuth\nseparately. OAuth retains expiry, granted scopes, and its coherent OAuth\u002FAPI\nendpoint pair, but not every Cloud product command supports it yet; use a CAP\nfor full compatibility.\n\n### Step 3: Switch to the context\n\n```bash\ngcx config use-context cloud\n```\n\n### Step 4: Verify the connection\n\n```bash\ngcx config check\n```\n\nA successful check prints the active context name and server URL without\nerrors. For Grafana Cloud, the stack ID (namespace) is auto-discovered from\nthe server's `\u002Fbootdata` endpoint -- you do not need to set `grafana.stack-id`\nmanually unless auto-discovery fails.\n\nIf the discovered stack ID conflicts with a manually configured\n`grafana.stack-id`, gcx raises a validation error - see\n[Namespace resolution issues](#namespace-resolution-issues).\n\n---\n\n## Path B: On-Premise Grafana\n\nUse this path when connecting to a self-hosted Grafana instance.\n\n### Step 1: Create a stack and context\n\n```bash\ngcx config set stacks.onprem.grafana.server https:\u002F\u002Fgrafana.example.com\ngcx config set contexts.onprem.stack onprem\n```\n\nReplace `onprem` with a name that identifies this environment (e.g.,\n`production`, `staging`, `local`).\n\n### Step 2: Set authentication\n\n**Option B-1: API token (recommended)**\n\n```bash\ngcx config set stacks.onprem.grafana.token glsa_XXXXXXXXXXXXXXXX\n```\n\n**Option B-2: Username and password**\n\n```bash\ngcx config set stacks.onprem.grafana.user admin\ngcx config set stacks.onprem.grafana.password mysecretpassword\n```\n\nUse Option B-1 when service accounts are available. Use Option B-2 for\ndevelopment or when service accounts are not configured.\n\n### Step 3: Set the org ID\n\nOn-premise Grafana uses an org ID to identify the namespace for API calls.\nSet it to the numeric ID of the organization (default org is 1):\n\n```bash\ngcx config set stacks.onprem.grafana.org-id 1\n```\n\nTo find the org ID: in Grafana, go to **Administration > Organizations** and\nnote the numeric ID shown in the URL when you select an org.\n\n### Step 4: Switch to the context\n\n```bash\ngcx config use-context onprem\n```\n\n### Step 5: Verify the connection\n\n```bash\ngcx config check\n```\n\n**TLS options** (optional): If your Grafana instance uses a self-signed\ncertificate or a custom CA, configure TLS:\n\n```bash\n# Skip TLS verification (development only -- do not use in production)\ngcx config set stacks.onprem.grafana.tls.insecure-skip-verify true\n\n# Supply a custom CA certificate (base64-encoded PEM)\ngcx config set stacks.onprem.grafana.tls.ca-data \u003Cbase64-encoded-pem>\n```\n\n---\n\n## Path C: Environment Variables (CI\u002FCD)\n\nUse this path when gcx runs in a CI\u002FCD pipeline or another automated\nenvironment where writing a config file is impractical. Environment variables\noverride the selected context's fields at runtime without modifying the config\nfile.\n\n| Environment Variable | Runtime override | Description |\n|----------------------|------------------|-------------|\n| `GRAFANA_SERVER` | selected stack's `grafana.server` | Server URL |\n| `GRAFANA_TOKEN` | selected stack's `grafana.token` | API token (takes precedence over user\u002Fpass) |\n| `GRAFANA_USER` | selected stack's `grafana.user` | Username for basic auth |\n| `GRAFANA_PASSWORD` | selected stack's `grafana.password` | Password for basic auth |\n| `GRAFANA_ORG_ID` | selected stack's `grafana.org-id` | Org ID (on-premise namespace) |\n| `GRAFANA_STACK_ID` | selected stack's `grafana.stack-id` | Stack ID (Grafana Cloud namespace) |\n| `GRAFANA_PROXY_ENDPOINT` | selected stack's OAuth proxy | Assistant proxy endpoint |\n| `GRAFANA_TLS_CERT_FILE` | selected stack's TLS cert file | mTLS client certificate |\n| `GRAFANA_TLS_KEY_FILE` | selected stack's TLS key file | mTLS client key |\n| `GRAFANA_TLS_CA_FILE` | selected stack's TLS CA file | Custom CA bundle |\n| `GRAFANA_CLOUD_TOKEN` | ephemeral Cloud entry | Cloud Access Policy token |\n| `GRAFANA_CLOUD_API_URL` | ephemeral Cloud entry | Cloud API endpoint |\n| `GRAFANA_CLOUD_OAUTH_URL` | ephemeral Cloud entry | Cloud OAuth endpoint |\n| `GRAFANA_CLOUD_STACK` | selected stack's slug | Cloud stack slug |\n\nWhen an endpoint override changes a credential destination, supply the\ncorresponding credential variable in the same invocation. Login commands turn\none supplied endpoint into a coherent OAuth\u002FAPI pair; set both endpoint\nvariables when a custom environment deliberately uses distinct origins.\n\nAn auto-discovered repository `.gcx.yaml` cannot attach runtime or freshly\nprompted credentials, or external mTLS client key files, to destinations and\ntransport settings supplied by that file. Review it and select it explicitly\nwith `--config .gcx.yaml` or `GCX_CONFIG=.gcx.yaml` before login or direct\nprovider authentication. Provider endpoint environment overrides also require\ntheir matching runtime credential and still do not authorize repository TLS or\nproxy settings.\n\n### Example: GitHub Actions\n\n```yaml\n- name: Run gcx\n  env:\n    GRAFANA_SERVER: ${{ secrets.GRAFANA_SERVER }}\n    GRAFANA_TOKEN: ${{ secrets.GRAFANA_TOKEN }}\n    GRAFANA_ORG_ID: \"1\"\n  run: gcx resources get dashboards -o json\n```\n\nEnvironment variables apply to the **selected context** only and do not modify\nthe config file on disk. `--context` selection happens before these overrides,\nand write-back paths never serialize the env-mutated runtime object.\n\n### Config file location\n\nTo supply a config file path explicitly:\n\n```bash\ngcx --config \u002Fpath\u002Fto\u002Fconfig.yaml resources get dashboards\n# or\nexport GCX_CONFIG=\u002Fpath\u002Fto\u002Fconfig.yaml\n```\n\nFor the full config file search order, see\n[configuration.md](references\u002Fconfiguration.md#config-file-location).\n\n---\n\n## Default Datasource Configuration\n\nTo avoid passing `-d \u003Cuid>` on every query command, configure default\ndatasource UIDs for the active context.\n\n### Find your datasource UIDs\n\n```bash\ngcx datasources list -o json\n```\n\nLocate the `uid` field for each datasource. Example output:\n\n```json\n{\n  \"datasources\": [\n    { \"uid\": \"prometheus-uid-abc123\", \"name\": \"Prometheus\", \"type\": \"prometheus\" },\n    { \"uid\": \"loki-uid-def456\",       \"name\": \"Loki\",       \"type\": \"loki\"       }\n  ]\n}\n```\n\n### Set defaults\n\n```bash\n# Set the default Prometheus datasource\ngcx config set contexts.cloud.datasources.prometheus prometheus-uid-abc123\n\n# Set the default Loki datasource\ngcx config set contexts.cloud.datasources.loki loki-uid-def456\n```\n\nReplace `cloud` with your context name and the UID values with those from the\noutput above. After setting these, query commands that support a `-d` flag will\nuse the configured defaults automatically.\n\n---\n\n## Multi-Context Management\n\nTo work with multiple Grafana environments, repeat Path A or B once per\nenvironment with a distinct context name, then:\n\n```bash\n# Switch between contexts\ngcx config use-context staging\n\n# Use a context for a single command without switching\ngcx --context staging resources get dashboards\n\n# List all contexts (secrets redacted; add --raw to reveal)\ngcx config view\n```\n\nFor create\u002Fupdate\u002Fremove patterns, see\n[configuration.md](references\u002Fconfiguration.md#multi-context-management).\n\n---\n\n## Troubleshooting\n\n### config check fails\n\nRun `gcx config check` to diagnose configuration problems. It prints the\nactive context and performs a live health check against the server.\n\nIf it reports a missing server or empty context:\n\n```bash\n# Verify current context is set\ngcx config view\n\n# Ensure the current-context field is not empty\ngcx config set current-context \u003Cyour-context-name>\n```\n\nIf it reports a missing namespace (stack ID or org ID):\n\n- **Grafana Cloud**: either let auto-discovery resolve it (no manual action\n  needed for `.grafana.net` URLs) or set `grafana.stack-id` explicitly.\n- **On-premise**: set `grafana.org-id` to the numeric org ID (usually `1`).\n\n### 401 Unauthorized\n\nThe token or credentials are invalid or expired.\n\n```bash\n# Replace with a fresh token\ngcx config set stacks.\u003Cname>.grafana.token glsa_NEW_TOKEN\n```\n\nVerify the token has not expired and has the correct permissions for the\noperations you intend to run.\n\n### 403 Forbidden\n\nThe token is valid but lacks permissions for the requested operation. In\nGrafana, navigate to **Administration > Service accounts**, select the service\naccount, and assign an appropriate role (Viewer, Editor, or Admin).\n\n### Connection refused or timeout\n\nThe server URL is unreachable.\n\n1. Confirm the URL is correct:\n\n   ```bash\n   gcx config view\n   ```\n\n2. Test connectivity from the machine running gcx:\n\n   ```bash\n   curl -I https:\u002F\u002Fgrafana.example.com\u002Fapi\u002Fhealth\n   ```\n\n3. Check for proxy requirements or VPN. If the instance uses a self-signed\n   certificate:\n\n   ```bash\n   gcx config set stacks.\u003Cname>.grafana.tls.insecure-skip-verify true\n   ```\n\n   Use `insecure-skip-verify` only for development; supply a CA certificate in\n   production environments instead.\n\n### Namespace resolution issues\n\ngcx resolves the API namespace (Kubernetes namespace for all calls) in\nthis order:\n\n1. Attempt auto-discovery via `\u002Fbootdata` HTTP call to the server\n2. If discovery fails and `org-id` is non-zero: use `org-\u003Cid>` namespace\n3. If discovery fails and `org-id` is zero: use configured `stack-id`\n\nIf you see a \"mismatched stack ID\" error, a configured `grafana.stack-id`\ndiffers from the auto-discovered value. Resolve by unsetting the manual value:\n\n```bash\ngcx config unset stacks.\u003Cname>.grafana.stack-id\n```\n\nIf you see a \"missing namespace\" error and auto-discovery is failing (e.g.,\nthe server does not expose `\u002Fbootdata`), set the namespace manually:\n\n```bash\n# On-premise\ngcx config set stacks.\u003Cname>.grafana.org-id 1\n\n# Grafana Cloud (if auto-discovery is unavailable)\ngcx config set stacks.\u003Cname>.grafana.stack-id 12345\n```\n\n---\n\n## Complete Example: Grafana Cloud with a Service Account Token\n\n```bash\n# 1. Set server and token on a stack, and bind a context to it\ngcx config set stacks.mycloud.grafana.server https:\u002F\u002Fmyorg.grafana.net\ngcx config set stacks.mycloud.grafana.token glsa_XXXXXXXXXXXXXXXX\ngcx config set contexts.mycloud.stack mycloud\n\n# 2. Activate the context\ngcx config use-context mycloud\n\n# 3. Verify\ngcx config check\n\n# 4. Set default datasources (after listing available ones)\ngcx datasources list -o json\ngcx config set contexts.mycloud.datasources.prometheus \u003Cprometheus-uid>\ngcx config set contexts.mycloud.datasources.loki \u003Cloki-uid>\n\n# 5. Test a resource listing\ngcx resources get dashboards -o json\n```\n\n---\n\n## Reference\n\nFor all config set paths, TLS fields, environment variables, namespace\nresolution rules, and multi-context patterns, see\n[configuration.md](references\u002Fconfiguration.md).\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,47,71,78,83,112,136,296,301,318,324,361,382,386,392,405,412,472,500,506,515,554,567,575,607,619,648,653,716,736,742,769,775,798,819,838,841,847,852,857,914,947,953,961,992,1000,1057,1062,1068,1073,1105,1117,1123,1149,1155,1176,1186,1287,1290,1296,1301,1667,1672,1701,1707,1830,1850,1856,1861,1932,1943,1946,1952,1965,1971,2005,2018,2296,2302,2382,2401,2404,2410,2415,2527,2538,2541,2547,2553,2565,2570,2653,2658,2710,2716,2721,2785,2790,2796,2807,2813,2818,2948,2953,2958,3011,3023,3071,3083,3202,3205,3211,3529,3532,3538,3548],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","Setup gcx",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51,53,60,62,69],{"type":45,"value":52},"Three configuration paths: Grafana Cloud (Path A), on-premise (Path B), and\nenvironment variables for CI\u002FCD (Path C). For the complete config reference\n(all ",{"type":40,"tag":54,"props":55,"children":57},"code",{"className":56},[],[58],{"type":45,"value":59},"config set",{"type":45,"value":61}," paths, TLS options, namespace resolution rules, multi-context\npatterns), see ",{"type":40,"tag":63,"props":64,"children":66},"a",{"href":65},"references\u002Fconfiguration.md",[67],{"type":45,"value":68},"configuration.md",{"type":45,"value":70},".",{"type":40,"tag":72,"props":73,"children":75},"h2",{"id":74},"step-0-install-gcx",[76],{"type":45,"value":77},"Step 0: Install gcx",{"type":40,"tag":48,"props":79,"children":80},{},[81],{"type":45,"value":82},"First, check whether gcx is already installed:",{"type":40,"tag":84,"props":85,"children":90},"pre",{"className":86,"code":87,"language":88,"meta":89,"style":89},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","gcx --version\n","bash","",[91],{"type":40,"tag":54,"props":92,"children":93},{"__ignoreMap":89},[94],{"type":40,"tag":95,"props":96,"children":99},"span",{"class":97,"line":98},"line",1,[100,106],{"type":40,"tag":95,"props":101,"children":103},{"style":102},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[104],{"type":45,"value":105},"gcx",{"type":40,"tag":95,"props":107,"children":109},{"style":108},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[110],{"type":45,"value":111}," --version\n",{"type":40,"tag":48,"props":113,"children":114},{},[115,117,125,127,134],{"type":45,"value":116},"If the command is not found, build it from source. Requires\n",{"type":40,"tag":63,"props":118,"children":122},{"href":119,"rel":120},"https:\u002F\u002Fgit-scm.com\u002F",[121],"nofollow",[123],{"type":45,"value":124},"git",{"type":45,"value":126}," and a recent ",{"type":40,"tag":63,"props":128,"children":131},{"href":129,"rel":130},"https:\u002F\u002Fgo.dev\u002F",[121],[132],{"type":45,"value":133},"Go",{"type":45,"value":135}," toolchain:",{"type":40,"tag":84,"props":137,"children":139},{"className":86,"code":138,"language":88,"meta":89,"style":89},"tmp=$(mktemp -d) && git clone --depth 1 https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx.git \"$tmp\" && (cd \"$tmp\" && go install .\u002Fcmd\u002Fgcx) && rm -rf \"$tmp\"\n",[140],{"type":40,"tag":54,"props":141,"children":142},{"__ignoreMap":89},[143],{"type":40,"tag":95,"props":144,"children":145},{"class":97,"line":98},[146,152,158,163,168,173,178,183,188,193,199,204,209,214,219,223,228,234,238,242,246,250,255,260,265,269,273,278,283,287,291],{"type":40,"tag":95,"props":147,"children":149},{"style":148},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[150],{"type":45,"value":151},"tmp",{"type":40,"tag":95,"props":153,"children":155},{"style":154},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[156],{"type":45,"value":157},"=$(",{"type":40,"tag":95,"props":159,"children":160},{"style":102},[161],{"type":45,"value":162},"mktemp",{"type":40,"tag":95,"props":164,"children":165},{"style":108},[166],{"type":45,"value":167}," -d",{"type":40,"tag":95,"props":169,"children":170},{"style":154},[171],{"type":45,"value":172},")",{"type":40,"tag":95,"props":174,"children":175},{"style":154},[176],{"type":45,"value":177}," &&",{"type":40,"tag":95,"props":179,"children":180},{"style":102},[181],{"type":45,"value":182}," git",{"type":40,"tag":95,"props":184,"children":185},{"style":108},[186],{"type":45,"value":187}," clone",{"type":40,"tag":95,"props":189,"children":190},{"style":108},[191],{"type":45,"value":192}," --depth",{"type":40,"tag":95,"props":194,"children":196},{"style":195},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[197],{"type":45,"value":198}," 1",{"type":40,"tag":95,"props":200,"children":201},{"style":108},[202],{"type":45,"value":203}," https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgcx.git",{"type":40,"tag":95,"props":205,"children":206},{"style":154},[207],{"type":45,"value":208}," \"",{"type":40,"tag":95,"props":210,"children":211},{"style":148},[212],{"type":45,"value":213},"$tmp",{"type":40,"tag":95,"props":215,"children":216},{"style":154},[217],{"type":45,"value":218},"\"",{"type":40,"tag":95,"props":220,"children":221},{"style":154},[222],{"type":45,"value":177},{"type":40,"tag":95,"props":224,"children":225},{"style":154},[226],{"type":45,"value":227}," (",{"type":40,"tag":95,"props":229,"children":231},{"style":230},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[232],{"type":45,"value":233},"cd",{"type":40,"tag":95,"props":235,"children":236},{"style":154},[237],{"type":45,"value":208},{"type":40,"tag":95,"props":239,"children":240},{"style":148},[241],{"type":45,"value":213},{"type":40,"tag":95,"props":243,"children":244},{"style":154},[245],{"type":45,"value":218},{"type":40,"tag":95,"props":247,"children":248},{"style":154},[249],{"type":45,"value":177},{"type":40,"tag":95,"props":251,"children":252},{"style":102},[253],{"type":45,"value":254}," go",{"type":40,"tag":95,"props":256,"children":257},{"style":108},[258],{"type":45,"value":259}," install",{"type":40,"tag":95,"props":261,"children":262},{"style":108},[263],{"type":45,"value":264}," .\u002Fcmd\u002Fgcx",{"type":40,"tag":95,"props":266,"children":267},{"style":154},[268],{"type":45,"value":172},{"type":40,"tag":95,"props":270,"children":271},{"style":154},[272],{"type":45,"value":177},{"type":40,"tag":95,"props":274,"children":275},{"style":102},[276],{"type":45,"value":277}," rm",{"type":40,"tag":95,"props":279,"children":280},{"style":108},[281],{"type":45,"value":282}," -rf",{"type":40,"tag":95,"props":284,"children":285},{"style":154},[286],{"type":45,"value":208},{"type":40,"tag":95,"props":288,"children":289},{"style":148},[290],{"type":45,"value":213},{"type":40,"tag":95,"props":292,"children":293},{"style":154},[294],{"type":45,"value":295},"\"\n",{"type":40,"tag":48,"props":297,"children":298},{},[299],{"type":45,"value":300},"After installing, verify the binary is on PATH:",{"type":40,"tag":84,"props":302,"children":303},{"className":86,"code":87,"language":88,"meta":89,"style":89},[304],{"type":40,"tag":54,"props":305,"children":306},{"__ignoreMap":89},[307],{"type":40,"tag":95,"props":308,"children":309},{"class":97,"line":98},[310,314],{"type":40,"tag":95,"props":311,"children":312},{"style":102},[313],{"type":45,"value":105},{"type":40,"tag":95,"props":315,"children":316},{"style":108},[317],{"type":45,"value":111},{"type":40,"tag":72,"props":319,"children":321},{"id":320},"configuration-model",[322],{"type":45,"value":323},"Configuration Model",{"type":40,"tag":48,"props":325,"children":326},{},[327,329,335,337,343,345,351,353,359],{"type":45,"value":328},"gcx uses a context-based configuration model inspired by kubectl's\nkubeconfig. One or more layered YAML files (with the user file at\n",{"type":40,"tag":54,"props":330,"children":332},{"className":331},[],[333],{"type":45,"value":334},"~\u002F.config\u002Fgcx\u002Fconfig.yaml",{"type":45,"value":336}," by default)\nstore named ",{"type":40,"tag":54,"props":338,"children":340},{"className":339},[],[341],{"type":45,"value":342},"stacks",{"type":45,"value":344}," (Grafana destination, credentials, provider config), named\n",{"type":40,"tag":54,"props":346,"children":348},{"className":347},[],[349],{"type":45,"value":350},"cloud",{"type":45,"value":352}," entries (Grafana Cloud platform credentials and endpoints), and thin\n",{"type":40,"tag":54,"props":354,"children":356},{"className":355},[],[357],{"type":45,"value":358},"contexts",{"type":45,"value":360}," that reference a stack and optional Cloud entry. One context is\nselected at a time; all commands operate against it unless overridden.\nSingle-source legacy configs are migrated automatically after a safe preflight.\nWhen several layers participate, gcx converts them in memory and asks the user\nto migrate each layer explicitly rather than partially persisting the result.",{"type":40,"tag":48,"props":362,"children":363},{},[364,366,372,374,380],{"type":45,"value":365},"Use ",{"type":40,"tag":54,"props":367,"children":369},{"className":368},[],[370],{"type":45,"value":371},"gcx config view",{"type":45,"value":373}," to inspect the current configuration at any time.\nUse ",{"type":40,"tag":54,"props":375,"children":377},{"className":376},[],[378],{"type":45,"value":379},"gcx config check",{"type":45,"value":381}," to validate that the active context is correct\nand can reach the server.",{"type":40,"tag":383,"props":384,"children":385},"hr",{},[],{"type":40,"tag":72,"props":387,"children":389},{"id":388},"path-a-grafana-cloud",[390],{"type":45,"value":391},"Path A: Grafana Cloud",{"type":40,"tag":48,"props":393,"children":394},{},[395,397,403],{"type":45,"value":396},"Use this path when connecting to a Grafana Cloud instance\n(URLs ending in ",{"type":40,"tag":54,"props":398,"children":400},{"className":399},[],[401],{"type":45,"value":402},".grafana.net",{"type":45,"value":404},").",{"type":40,"tag":406,"props":407,"children":409},"h3",{"id":408},"step-1-create-a-stack-and-context",[410],{"type":45,"value":411},"Step 1: Create a stack and context",{"type":40,"tag":84,"props":413,"children":415},{"className":86,"code":414,"language":88,"meta":89,"style":89},"gcx config set stacks.cloud.grafana.server https:\u002F\u002Fmyorg.grafana.net\ngcx config set contexts.cloud.stack cloud\n",[416],{"type":40,"tag":54,"props":417,"children":418},{"__ignoreMap":89},[419,446],{"type":40,"tag":95,"props":420,"children":421},{"class":97,"line":98},[422,426,431,436,441],{"type":40,"tag":95,"props":423,"children":424},{"style":102},[425],{"type":45,"value":105},{"type":40,"tag":95,"props":427,"children":428},{"style":108},[429],{"type":45,"value":430}," config",{"type":40,"tag":95,"props":432,"children":433},{"style":108},[434],{"type":45,"value":435}," set",{"type":40,"tag":95,"props":437,"children":438},{"style":108},[439],{"type":45,"value":440}," stacks.cloud.grafana.server",{"type":40,"tag":95,"props":442,"children":443},{"style":108},[444],{"type":45,"value":445}," https:\u002F\u002Fmyorg.grafana.net\n",{"type":40,"tag":95,"props":447,"children":449},{"class":97,"line":448},2,[450,454,458,462,467],{"type":40,"tag":95,"props":451,"children":452},{"style":102},[453],{"type":45,"value":105},{"type":40,"tag":95,"props":455,"children":456},{"style":108},[457],{"type":45,"value":430},{"type":40,"tag":95,"props":459,"children":460},{"style":108},[461],{"type":45,"value":435},{"type":40,"tag":95,"props":463,"children":464},{"style":108},[465],{"type":45,"value":466}," contexts.cloud.stack",{"type":40,"tag":95,"props":468,"children":469},{"style":108},[470],{"type":45,"value":471}," cloud\n",{"type":40,"tag":48,"props":473,"children":474},{},[475,477,482,484,490,492,498],{"type":45,"value":476},"Replace ",{"type":40,"tag":54,"props":478,"children":480},{"className":479},[],[481],{"type":45,"value":350},{"type":45,"value":483}," with any name you prefer (e.g., ",{"type":40,"tag":54,"props":485,"children":487},{"className":486},[],[488],{"type":45,"value":489},"prod",{"type":45,"value":491},", ",{"type":40,"tag":54,"props":493,"children":495},{"className":494},[],[496],{"type":45,"value":497},"myorg-cloud",{"type":45,"value":499},").\nReplace the server URL with your Grafana Cloud URL. The first command creates\nthe stack entry; the second creates a context pointing at it.",{"type":40,"tag":406,"props":501,"children":503},{"id":502},"step-2-authenticate",[504],{"type":45,"value":505},"Step 2: Authenticate",{"type":40,"tag":48,"props":507,"children":508},{},[509],{"type":40,"tag":510,"props":511,"children":512},"strong",{},[513],{"type":45,"value":514},"Option A-1: Browser OAuth (recommended for Grafana Cloud)",{"type":40,"tag":84,"props":516,"children":518},{"className":86,"code":517,"language":88,"meta":89,"style":89},"gcx login cloud --server https:\u002F\u002Fmyorg.grafana.net --oauth\n",[519],{"type":40,"tag":54,"props":520,"children":521},{"__ignoreMap":89},[522],{"type":40,"tag":95,"props":523,"children":524},{"class":97,"line":98},[525,529,534,539,544,549],{"type":40,"tag":95,"props":526,"children":527},{"style":102},[528],{"type":45,"value":105},{"type":40,"tag":95,"props":530,"children":531},{"style":108},[532],{"type":45,"value":533}," login",{"type":40,"tag":95,"props":535,"children":536},{"style":108},[537],{"type":45,"value":538}," cloud",{"type":40,"tag":95,"props":540,"children":541},{"style":108},[542],{"type":45,"value":543}," --server",{"type":40,"tag":95,"props":545,"children":546},{"style":108},[547],{"type":45,"value":548}," https:\u002F\u002Fmyorg.grafana.net",{"type":40,"tag":95,"props":550,"children":551},{"style":108},[552],{"type":45,"value":553}," --oauth\n",{"type":40,"tag":48,"props":555,"children":556},{},[557,559,565],{"type":45,"value":558},"Opens a browser for the user to approve. This works non-interactively and in\nagent mode — the agent issues the command, the browser opens, and the user\napproves. No token to create or paste. ",{"type":40,"tag":54,"props":560,"children":562},{"className":561},[],[563],{"type":45,"value":564},"gcx login",{"type":45,"value":566}," also sets the context as\ncurrent and verifies connectivity, so Steps 1, 3, and 4 are handled for you;\nskip them when using this option.",{"type":40,"tag":48,"props":568,"children":569},{},[570],{"type":40,"tag":510,"props":571,"children":572},{},[573],{"type":45,"value":574},"Option A-2: Service account token",{"type":40,"tag":84,"props":576,"children":578},{"className":86,"code":577,"language":88,"meta":89,"style":89},"gcx config set stacks.cloud.grafana.token glsa_XXXXXXXXXXXXXXXX\n",[579],{"type":40,"tag":54,"props":580,"children":581},{"__ignoreMap":89},[582],{"type":40,"tag":95,"props":583,"children":584},{"class":97,"line":98},[585,589,593,597,602],{"type":40,"tag":95,"props":586,"children":587},{"style":102},[588],{"type":45,"value":105},{"type":40,"tag":95,"props":590,"children":591},{"style":108},[592],{"type":45,"value":430},{"type":40,"tag":95,"props":594,"children":595},{"style":108},[596],{"type":45,"value":435},{"type":40,"tag":95,"props":598,"children":599},{"style":108},[600],{"type":45,"value":601}," stacks.cloud.grafana.token",{"type":40,"tag":95,"props":603,"children":604},{"style":108},[605],{"type":45,"value":606}," glsa_XXXXXXXXXXXXXXXX\n",{"type":40,"tag":48,"props":608,"children":609},{},[610,612,617],{"type":45,"value":611},"Obtain a service account token from ",{"type":40,"tag":510,"props":613,"children":614},{},[615],{"type":45,"value":616},"Administration > Service accounts",{"type":45,"value":618}," in\nyour Grafana Cloud instance. The token must have sufficient permissions for the\noperations you intend to run (Viewer for read-only, Editor or Admin for write\noperations).",{"type":40,"tag":48,"props":620,"children":621},{},[622,624,630,632,638,640,646],{"type":45,"value":623},"The ",{"type":40,"tag":54,"props":625,"children":627},{"className":626},[],[628],{"type":45,"value":629},"grafana.token",{"type":45,"value":631}," field takes precedence over ",{"type":40,"tag":54,"props":633,"children":635},{"className":634},[],[636],{"type":45,"value":637},"grafana.user",{"type":45,"value":639},"\u002F",{"type":40,"tag":54,"props":641,"children":643},{"className":642},[],[644],{"type":45,"value":645},"grafana.password",{"type":45,"value":647},"\nwhen both are present.",{"type":40,"tag":48,"props":649,"children":650},{},[651],{"type":45,"value":652},"Grafana Cloud product APIs use a separate credential. A Cloud Access Policy\ntoken has the widest compatibility and can be supplied during unified login:",{"type":40,"tag":84,"props":654,"children":656},{"className":86,"code":655,"language":88,"meta":89,"style":89},"gcx login cloud --server https:\u002F\u002Fmyorg.grafana.net \\\n  --token glsa_XXXXXXXXXXXXXXXX --cloud-token glc_XXXXXXXXXXXXXXXX --yes\n",[657],{"type":40,"tag":54,"props":658,"children":659},{"__ignoreMap":89},[660,688],{"type":40,"tag":95,"props":661,"children":662},{"class":97,"line":98},[663,667,671,675,679,683],{"type":40,"tag":95,"props":664,"children":665},{"style":102},[666],{"type":45,"value":105},{"type":40,"tag":95,"props":668,"children":669},{"style":108},[670],{"type":45,"value":533},{"type":40,"tag":95,"props":672,"children":673},{"style":108},[674],{"type":45,"value":538},{"type":40,"tag":95,"props":676,"children":677},{"style":108},[678],{"type":45,"value":543},{"type":40,"tag":95,"props":680,"children":681},{"style":108},[682],{"type":45,"value":548},{"type":40,"tag":95,"props":684,"children":685},{"style":148},[686],{"type":45,"value":687}," \\\n",{"type":40,"tag":95,"props":689,"children":690},{"class":97,"line":448},[691,696,701,706,711],{"type":40,"tag":95,"props":692,"children":693},{"style":108},[694],{"type":45,"value":695},"  --token",{"type":40,"tag":95,"props":697,"children":698},{"style":108},[699],{"type":45,"value":700}," glsa_XXXXXXXXXXXXXXXX",{"type":40,"tag":95,"props":702,"children":703},{"style":108},[704],{"type":45,"value":705}," --cloud-token",{"type":40,"tag":95,"props":707,"children":708},{"style":108},[709],{"type":45,"value":710}," glc_XXXXXXXXXXXXXXXX",{"type":40,"tag":95,"props":712,"children":713},{"style":108},[714],{"type":45,"value":715}," --yes\n",{"type":40,"tag":48,"props":717,"children":718},{},[719,721,726,728,734],{"type":45,"value":720},"For interactive use, the Cloud step of ",{"type":40,"tag":54,"props":722,"children":724},{"className":723},[],[725],{"type":45,"value":564},{"type":45,"value":727}," can keep an existing CAP or\nunexpired OAuth credential, accept a CAP, run the experimental direct Cloud\nOAuth flow, or skip. ",{"type":40,"tag":54,"props":729,"children":731},{"className":730},[],[732],{"type":45,"value":733},"gcx cloud login --context cloud",{"type":45,"value":735}," runs direct Cloud OAuth\nseparately. OAuth retains expiry, granted scopes, and its coherent OAuth\u002FAPI\nendpoint pair, but not every Cloud product command supports it yet; use a CAP\nfor full compatibility.",{"type":40,"tag":406,"props":737,"children":739},{"id":738},"step-3-switch-to-the-context",[740],{"type":45,"value":741},"Step 3: Switch to the context",{"type":40,"tag":84,"props":743,"children":745},{"className":86,"code":744,"language":88,"meta":89,"style":89},"gcx config use-context cloud\n",[746],{"type":40,"tag":54,"props":747,"children":748},{"__ignoreMap":89},[749],{"type":40,"tag":95,"props":750,"children":751},{"class":97,"line":98},[752,756,760,765],{"type":40,"tag":95,"props":753,"children":754},{"style":102},[755],{"type":45,"value":105},{"type":40,"tag":95,"props":757,"children":758},{"style":108},[759],{"type":45,"value":430},{"type":40,"tag":95,"props":761,"children":762},{"style":108},[763],{"type":45,"value":764}," use-context",{"type":40,"tag":95,"props":766,"children":767},{"style":108},[768],{"type":45,"value":471},{"type":40,"tag":406,"props":770,"children":772},{"id":771},"step-4-verify-the-connection",[773],{"type":45,"value":774},"Step 4: Verify the connection",{"type":40,"tag":84,"props":776,"children":778},{"className":86,"code":777,"language":88,"meta":89,"style":89},"gcx config check\n",[779],{"type":40,"tag":54,"props":780,"children":781},{"__ignoreMap":89},[782],{"type":40,"tag":95,"props":783,"children":784},{"class":97,"line":98},[785,789,793],{"type":40,"tag":95,"props":786,"children":787},{"style":102},[788],{"type":45,"value":105},{"type":40,"tag":95,"props":790,"children":791},{"style":108},[792],{"type":45,"value":430},{"type":40,"tag":95,"props":794,"children":795},{"style":108},[796],{"type":45,"value":797}," check\n",{"type":40,"tag":48,"props":799,"children":800},{},[801,803,809,811,817],{"type":45,"value":802},"A successful check prints the active context name and server URL without\nerrors. For Grafana Cloud, the stack ID (namespace) is auto-discovered from\nthe server's ",{"type":40,"tag":54,"props":804,"children":806},{"className":805},[],[807],{"type":45,"value":808},"\u002Fbootdata",{"type":45,"value":810}," endpoint -- you do not need to set ",{"type":40,"tag":54,"props":812,"children":814},{"className":813},[],[815],{"type":45,"value":816},"grafana.stack-id",{"type":45,"value":818},"\nmanually unless auto-discovery fails.",{"type":40,"tag":48,"props":820,"children":821},{},[822,824,829,831,837],{"type":45,"value":823},"If the discovered stack ID conflicts with a manually configured\n",{"type":40,"tag":54,"props":825,"children":827},{"className":826},[],[828],{"type":45,"value":816},{"type":45,"value":830},", gcx raises a validation error - see\n",{"type":40,"tag":63,"props":832,"children":834},{"href":833},"#namespace-resolution-issues",[835],{"type":45,"value":836},"Namespace resolution issues",{"type":45,"value":70},{"type":40,"tag":383,"props":839,"children":840},{},[],{"type":40,"tag":72,"props":842,"children":844},{"id":843},"path-b-on-premise-grafana",[845],{"type":45,"value":846},"Path B: On-Premise Grafana",{"type":40,"tag":48,"props":848,"children":849},{},[850],{"type":45,"value":851},"Use this path when connecting to a self-hosted Grafana instance.",{"type":40,"tag":406,"props":853,"children":855},{"id":854},"step-1-create-a-stack-and-context-1",[856],{"type":45,"value":411},{"type":40,"tag":84,"props":858,"children":860},{"className":86,"code":859,"language":88,"meta":89,"style":89},"gcx config set stacks.onprem.grafana.server https:\u002F\u002Fgrafana.example.com\ngcx config set contexts.onprem.stack onprem\n",[861],{"type":40,"tag":54,"props":862,"children":863},{"__ignoreMap":89},[864,889],{"type":40,"tag":95,"props":865,"children":866},{"class":97,"line":98},[867,871,875,879,884],{"type":40,"tag":95,"props":868,"children":869},{"style":102},[870],{"type":45,"value":105},{"type":40,"tag":95,"props":872,"children":873},{"style":108},[874],{"type":45,"value":430},{"type":40,"tag":95,"props":876,"children":877},{"style":108},[878],{"type":45,"value":435},{"type":40,"tag":95,"props":880,"children":881},{"style":108},[882],{"type":45,"value":883}," stacks.onprem.grafana.server",{"type":40,"tag":95,"props":885,"children":886},{"style":108},[887],{"type":45,"value":888}," https:\u002F\u002Fgrafana.example.com\n",{"type":40,"tag":95,"props":890,"children":891},{"class":97,"line":448},[892,896,900,904,909],{"type":40,"tag":95,"props":893,"children":894},{"style":102},[895],{"type":45,"value":105},{"type":40,"tag":95,"props":897,"children":898},{"style":108},[899],{"type":45,"value":430},{"type":40,"tag":95,"props":901,"children":902},{"style":108},[903],{"type":45,"value":435},{"type":40,"tag":95,"props":905,"children":906},{"style":108},[907],{"type":45,"value":908}," contexts.onprem.stack",{"type":40,"tag":95,"props":910,"children":911},{"style":108},[912],{"type":45,"value":913}," onprem\n",{"type":40,"tag":48,"props":915,"children":916},{},[917,918,924,926,932,933,939,940,946],{"type":45,"value":476},{"type":40,"tag":54,"props":919,"children":921},{"className":920},[],[922],{"type":45,"value":923},"onprem",{"type":45,"value":925}," with a name that identifies this environment (e.g.,\n",{"type":40,"tag":54,"props":927,"children":929},{"className":928},[],[930],{"type":45,"value":931},"production",{"type":45,"value":491},{"type":40,"tag":54,"props":934,"children":936},{"className":935},[],[937],{"type":45,"value":938},"staging",{"type":45,"value":491},{"type":40,"tag":54,"props":941,"children":943},{"className":942},[],[944],{"type":45,"value":945},"local",{"type":45,"value":404},{"type":40,"tag":406,"props":948,"children":950},{"id":949},"step-2-set-authentication",[951],{"type":45,"value":952},"Step 2: Set authentication",{"type":40,"tag":48,"props":954,"children":955},{},[956],{"type":40,"tag":510,"props":957,"children":958},{},[959],{"type":45,"value":960},"Option B-1: API token (recommended)",{"type":40,"tag":84,"props":962,"children":964},{"className":86,"code":963,"language":88,"meta":89,"style":89},"gcx config set stacks.onprem.grafana.token glsa_XXXXXXXXXXXXXXXX\n",[965],{"type":40,"tag":54,"props":966,"children":967},{"__ignoreMap":89},[968],{"type":40,"tag":95,"props":969,"children":970},{"class":97,"line":98},[971,975,979,983,988],{"type":40,"tag":95,"props":972,"children":973},{"style":102},[974],{"type":45,"value":105},{"type":40,"tag":95,"props":976,"children":977},{"style":108},[978],{"type":45,"value":430},{"type":40,"tag":95,"props":980,"children":981},{"style":108},[982],{"type":45,"value":435},{"type":40,"tag":95,"props":984,"children":985},{"style":108},[986],{"type":45,"value":987}," stacks.onprem.grafana.token",{"type":40,"tag":95,"props":989,"children":990},{"style":108},[991],{"type":45,"value":606},{"type":40,"tag":48,"props":993,"children":994},{},[995],{"type":40,"tag":510,"props":996,"children":997},{},[998],{"type":45,"value":999},"Option B-2: Username and password",{"type":40,"tag":84,"props":1001,"children":1003},{"className":86,"code":1002,"language":88,"meta":89,"style":89},"gcx config set stacks.onprem.grafana.user admin\ngcx config set stacks.onprem.grafana.password mysecretpassword\n",[1004],{"type":40,"tag":54,"props":1005,"children":1006},{"__ignoreMap":89},[1007,1032],{"type":40,"tag":95,"props":1008,"children":1009},{"class":97,"line":98},[1010,1014,1018,1022,1027],{"type":40,"tag":95,"props":1011,"children":1012},{"style":102},[1013],{"type":45,"value":105},{"type":40,"tag":95,"props":1015,"children":1016},{"style":108},[1017],{"type":45,"value":430},{"type":40,"tag":95,"props":1019,"children":1020},{"style":108},[1021],{"type":45,"value":435},{"type":40,"tag":95,"props":1023,"children":1024},{"style":108},[1025],{"type":45,"value":1026}," stacks.onprem.grafana.user",{"type":40,"tag":95,"props":1028,"children":1029},{"style":108},[1030],{"type":45,"value":1031}," admin\n",{"type":40,"tag":95,"props":1033,"children":1034},{"class":97,"line":448},[1035,1039,1043,1047,1052],{"type":40,"tag":95,"props":1036,"children":1037},{"style":102},[1038],{"type":45,"value":105},{"type":40,"tag":95,"props":1040,"children":1041},{"style":108},[1042],{"type":45,"value":430},{"type":40,"tag":95,"props":1044,"children":1045},{"style":108},[1046],{"type":45,"value":435},{"type":40,"tag":95,"props":1048,"children":1049},{"style":108},[1050],{"type":45,"value":1051}," stacks.onprem.grafana.password",{"type":40,"tag":95,"props":1053,"children":1054},{"style":108},[1055],{"type":45,"value":1056}," mysecretpassword\n",{"type":40,"tag":48,"props":1058,"children":1059},{},[1060],{"type":45,"value":1061},"Use Option B-1 when service accounts are available. Use Option B-2 for\ndevelopment or when service accounts are not configured.",{"type":40,"tag":406,"props":1063,"children":1065},{"id":1064},"step-3-set-the-org-id",[1066],{"type":45,"value":1067},"Step 3: Set the org ID",{"type":40,"tag":48,"props":1069,"children":1070},{},[1071],{"type":45,"value":1072},"On-premise Grafana uses an org ID to identify the namespace for API calls.\nSet it to the numeric ID of the organization (default org is 1):",{"type":40,"tag":84,"props":1074,"children":1076},{"className":86,"code":1075,"language":88,"meta":89,"style":89},"gcx config set stacks.onprem.grafana.org-id 1\n",[1077],{"type":40,"tag":54,"props":1078,"children":1079},{"__ignoreMap":89},[1080],{"type":40,"tag":95,"props":1081,"children":1082},{"class":97,"line":98},[1083,1087,1091,1095,1100],{"type":40,"tag":95,"props":1084,"children":1085},{"style":102},[1086],{"type":45,"value":105},{"type":40,"tag":95,"props":1088,"children":1089},{"style":108},[1090],{"type":45,"value":430},{"type":40,"tag":95,"props":1092,"children":1093},{"style":108},[1094],{"type":45,"value":435},{"type":40,"tag":95,"props":1096,"children":1097},{"style":108},[1098],{"type":45,"value":1099}," stacks.onprem.grafana.org-id",{"type":40,"tag":95,"props":1101,"children":1102},{"style":195},[1103],{"type":45,"value":1104}," 1\n",{"type":40,"tag":48,"props":1106,"children":1107},{},[1108,1110,1115],{"type":45,"value":1109},"To find the org ID: in Grafana, go to ",{"type":40,"tag":510,"props":1111,"children":1112},{},[1113],{"type":45,"value":1114},"Administration > Organizations",{"type":45,"value":1116}," and\nnote the numeric ID shown in the URL when you select an org.",{"type":40,"tag":406,"props":1118,"children":1120},{"id":1119},"step-4-switch-to-the-context",[1121],{"type":45,"value":1122},"Step 4: Switch to the context",{"type":40,"tag":84,"props":1124,"children":1126},{"className":86,"code":1125,"language":88,"meta":89,"style":89},"gcx config use-context onprem\n",[1127],{"type":40,"tag":54,"props":1128,"children":1129},{"__ignoreMap":89},[1130],{"type":40,"tag":95,"props":1131,"children":1132},{"class":97,"line":98},[1133,1137,1141,1145],{"type":40,"tag":95,"props":1134,"children":1135},{"style":102},[1136],{"type":45,"value":105},{"type":40,"tag":95,"props":1138,"children":1139},{"style":108},[1140],{"type":45,"value":430},{"type":40,"tag":95,"props":1142,"children":1143},{"style":108},[1144],{"type":45,"value":764},{"type":40,"tag":95,"props":1146,"children":1147},{"style":108},[1148],{"type":45,"value":913},{"type":40,"tag":406,"props":1150,"children":1152},{"id":1151},"step-5-verify-the-connection",[1153],{"type":45,"value":1154},"Step 5: Verify the connection",{"type":40,"tag":84,"props":1156,"children":1157},{"className":86,"code":777,"language":88,"meta":89,"style":89},[1158],{"type":40,"tag":54,"props":1159,"children":1160},{"__ignoreMap":89},[1161],{"type":40,"tag":95,"props":1162,"children":1163},{"class":97,"line":98},[1164,1168,1172],{"type":40,"tag":95,"props":1165,"children":1166},{"style":102},[1167],{"type":45,"value":105},{"type":40,"tag":95,"props":1169,"children":1170},{"style":108},[1171],{"type":45,"value":430},{"type":40,"tag":95,"props":1173,"children":1174},{"style":108},[1175],{"type":45,"value":797},{"type":40,"tag":48,"props":1177,"children":1178},{},[1179,1184],{"type":40,"tag":510,"props":1180,"children":1181},{},[1182],{"type":45,"value":1183},"TLS options",{"type":45,"value":1185}," (optional): If your Grafana instance uses a self-signed\ncertificate or a custom CA, configure TLS:",{"type":40,"tag":84,"props":1187,"children":1189},{"className":86,"code":1188,"language":88,"meta":89,"style":89},"# Skip TLS verification (development only -- do not use in production)\ngcx config set stacks.onprem.grafana.tls.insecure-skip-verify true\n\n# Supply a custom CA certificate (base64-encoded PEM)\ngcx config set stacks.onprem.grafana.tls.ca-data \u003Cbase64-encoded-pem>\n",[1190],{"type":40,"tag":54,"props":1191,"children":1192},{"__ignoreMap":89},[1193,1202,1227,1237,1246],{"type":40,"tag":95,"props":1194,"children":1195},{"class":97,"line":98},[1196],{"type":40,"tag":95,"props":1197,"children":1199},{"style":1198},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1200],{"type":45,"value":1201},"# Skip TLS verification (development only -- do not use in production)\n",{"type":40,"tag":95,"props":1203,"children":1204},{"class":97,"line":448},[1205,1209,1213,1217,1222],{"type":40,"tag":95,"props":1206,"children":1207},{"style":102},[1208],{"type":45,"value":105},{"type":40,"tag":95,"props":1210,"children":1211},{"style":108},[1212],{"type":45,"value":430},{"type":40,"tag":95,"props":1214,"children":1215},{"style":108},[1216],{"type":45,"value":435},{"type":40,"tag":95,"props":1218,"children":1219},{"style":108},[1220],{"type":45,"value":1221}," stacks.onprem.grafana.tls.insecure-skip-verify",{"type":40,"tag":95,"props":1223,"children":1224},{"style":154},[1225],{"type":45,"value":1226}," true\n",{"type":40,"tag":95,"props":1228,"children":1230},{"class":97,"line":1229},3,[1231],{"type":40,"tag":95,"props":1232,"children":1234},{"emptyLinePlaceholder":1233},true,[1235],{"type":45,"value":1236},"\n",{"type":40,"tag":95,"props":1238,"children":1240},{"class":97,"line":1239},4,[1241],{"type":40,"tag":95,"props":1242,"children":1243},{"style":1198},[1244],{"type":45,"value":1245},"# Supply a custom CA certificate (base64-encoded PEM)\n",{"type":40,"tag":95,"props":1247,"children":1249},{"class":97,"line":1248},5,[1250,1254,1258,1262,1267,1272,1277,1282],{"type":40,"tag":95,"props":1251,"children":1252},{"style":102},[1253],{"type":45,"value":105},{"type":40,"tag":95,"props":1255,"children":1256},{"style":108},[1257],{"type":45,"value":430},{"type":40,"tag":95,"props":1259,"children":1260},{"style":108},[1261],{"type":45,"value":435},{"type":40,"tag":95,"props":1263,"children":1264},{"style":108},[1265],{"type":45,"value":1266}," stacks.onprem.grafana.tls.ca-data",{"type":40,"tag":95,"props":1268,"children":1269},{"style":154},[1270],{"type":45,"value":1271}," \u003C",{"type":40,"tag":95,"props":1273,"children":1274},{"style":108},[1275],{"type":45,"value":1276},"base64-encoded-pe",{"type":40,"tag":95,"props":1278,"children":1279},{"style":148},[1280],{"type":45,"value":1281},"m",{"type":40,"tag":95,"props":1283,"children":1284},{"style":154},[1285],{"type":45,"value":1286},">\n",{"type":40,"tag":383,"props":1288,"children":1289},{},[],{"type":40,"tag":72,"props":1291,"children":1293},{"id":1292},"path-c-environment-variables-cicd",[1294],{"type":45,"value":1295},"Path C: Environment Variables (CI\u002FCD)",{"type":40,"tag":48,"props":1297,"children":1298},{},[1299],{"type":45,"value":1300},"Use this path when gcx runs in a CI\u002FCD pipeline or another automated\nenvironment where writing a config file is impractical. Environment variables\noverride the selected context's fields at runtime without modifying the config\nfile.",{"type":40,"tag":1302,"props":1303,"children":1304},"table",{},[1305,1329],{"type":40,"tag":1306,"props":1307,"children":1308},"thead",{},[1309],{"type":40,"tag":1310,"props":1311,"children":1312},"tr",{},[1313,1319,1324],{"type":40,"tag":1314,"props":1315,"children":1316},"th",{},[1317],{"type":45,"value":1318},"Environment Variable",{"type":40,"tag":1314,"props":1320,"children":1321},{},[1322],{"type":45,"value":1323},"Runtime override",{"type":40,"tag":1314,"props":1325,"children":1326},{},[1327],{"type":45,"value":1328},"Description",{"type":40,"tag":1330,"props":1331,"children":1332},"tbody",{},[1333,1362,1388,1414,1440,1467,1493,1515,1537,1559,1581,1603,1624,1645],{"type":40,"tag":1310,"props":1334,"children":1335},{},[1336,1346,1357],{"type":40,"tag":1337,"props":1338,"children":1339},"td",{},[1340],{"type":40,"tag":54,"props":1341,"children":1343},{"className":1342},[],[1344],{"type":45,"value":1345},"GRAFANA_SERVER",{"type":40,"tag":1337,"props":1347,"children":1348},{},[1349,1351],{"type":45,"value":1350},"selected stack's ",{"type":40,"tag":54,"props":1352,"children":1354},{"className":1353},[],[1355],{"type":45,"value":1356},"grafana.server",{"type":40,"tag":1337,"props":1358,"children":1359},{},[1360],{"type":45,"value":1361},"Server URL",{"type":40,"tag":1310,"props":1363,"children":1364},{},[1365,1374,1383],{"type":40,"tag":1337,"props":1366,"children":1367},{},[1368],{"type":40,"tag":54,"props":1369,"children":1371},{"className":1370},[],[1372],{"type":45,"value":1373},"GRAFANA_TOKEN",{"type":40,"tag":1337,"props":1375,"children":1376},{},[1377,1378],{"type":45,"value":1350},{"type":40,"tag":54,"props":1379,"children":1381},{"className":1380},[],[1382],{"type":45,"value":629},{"type":40,"tag":1337,"props":1384,"children":1385},{},[1386],{"type":45,"value":1387},"API token (takes precedence over user\u002Fpass)",{"type":40,"tag":1310,"props":1389,"children":1390},{},[1391,1400,1409],{"type":40,"tag":1337,"props":1392,"children":1393},{},[1394],{"type":40,"tag":54,"props":1395,"children":1397},{"className":1396},[],[1398],{"type":45,"value":1399},"GRAFANA_USER",{"type":40,"tag":1337,"props":1401,"children":1402},{},[1403,1404],{"type":45,"value":1350},{"type":40,"tag":54,"props":1405,"children":1407},{"className":1406},[],[1408],{"type":45,"value":637},{"type":40,"tag":1337,"props":1410,"children":1411},{},[1412],{"type":45,"value":1413},"Username for basic auth",{"type":40,"tag":1310,"props":1415,"children":1416},{},[1417,1426,1435],{"type":40,"tag":1337,"props":1418,"children":1419},{},[1420],{"type":40,"tag":54,"props":1421,"children":1423},{"className":1422},[],[1424],{"type":45,"value":1425},"GRAFANA_PASSWORD",{"type":40,"tag":1337,"props":1427,"children":1428},{},[1429,1430],{"type":45,"value":1350},{"type":40,"tag":54,"props":1431,"children":1433},{"className":1432},[],[1434],{"type":45,"value":645},{"type":40,"tag":1337,"props":1436,"children":1437},{},[1438],{"type":45,"value":1439},"Password for basic auth",{"type":40,"tag":1310,"props":1441,"children":1442},{},[1443,1452,1462],{"type":40,"tag":1337,"props":1444,"children":1445},{},[1446],{"type":40,"tag":54,"props":1447,"children":1449},{"className":1448},[],[1450],{"type":45,"value":1451},"GRAFANA_ORG_ID",{"type":40,"tag":1337,"props":1453,"children":1454},{},[1455,1456],{"type":45,"value":1350},{"type":40,"tag":54,"props":1457,"children":1459},{"className":1458},[],[1460],{"type":45,"value":1461},"grafana.org-id",{"type":40,"tag":1337,"props":1463,"children":1464},{},[1465],{"type":45,"value":1466},"Org ID (on-premise namespace)",{"type":40,"tag":1310,"props":1468,"children":1469},{},[1470,1479,1488],{"type":40,"tag":1337,"props":1471,"children":1472},{},[1473],{"type":40,"tag":54,"props":1474,"children":1476},{"className":1475},[],[1477],{"type":45,"value":1478},"GRAFANA_STACK_ID",{"type":40,"tag":1337,"props":1480,"children":1481},{},[1482,1483],{"type":45,"value":1350},{"type":40,"tag":54,"props":1484,"children":1486},{"className":1485},[],[1487],{"type":45,"value":816},{"type":40,"tag":1337,"props":1489,"children":1490},{},[1491],{"type":45,"value":1492},"Stack ID (Grafana Cloud namespace)",{"type":40,"tag":1310,"props":1494,"children":1495},{},[1496,1505,1510],{"type":40,"tag":1337,"props":1497,"children":1498},{},[1499],{"type":40,"tag":54,"props":1500,"children":1502},{"className":1501},[],[1503],{"type":45,"value":1504},"GRAFANA_PROXY_ENDPOINT",{"type":40,"tag":1337,"props":1506,"children":1507},{},[1508],{"type":45,"value":1509},"selected stack's OAuth proxy",{"type":40,"tag":1337,"props":1511,"children":1512},{},[1513],{"type":45,"value":1514},"Assistant proxy endpoint",{"type":40,"tag":1310,"props":1516,"children":1517},{},[1518,1527,1532],{"type":40,"tag":1337,"props":1519,"children":1520},{},[1521],{"type":40,"tag":54,"props":1522,"children":1524},{"className":1523},[],[1525],{"type":45,"value":1526},"GRAFANA_TLS_CERT_FILE",{"type":40,"tag":1337,"props":1528,"children":1529},{},[1530],{"type":45,"value":1531},"selected stack's TLS cert file",{"type":40,"tag":1337,"props":1533,"children":1534},{},[1535],{"type":45,"value":1536},"mTLS client certificate",{"type":40,"tag":1310,"props":1538,"children":1539},{},[1540,1549,1554],{"type":40,"tag":1337,"props":1541,"children":1542},{},[1543],{"type":40,"tag":54,"props":1544,"children":1546},{"className":1545},[],[1547],{"type":45,"value":1548},"GRAFANA_TLS_KEY_FILE",{"type":40,"tag":1337,"props":1550,"children":1551},{},[1552],{"type":45,"value":1553},"selected stack's TLS key file",{"type":40,"tag":1337,"props":1555,"children":1556},{},[1557],{"type":45,"value":1558},"mTLS client key",{"type":40,"tag":1310,"props":1560,"children":1561},{},[1562,1571,1576],{"type":40,"tag":1337,"props":1563,"children":1564},{},[1565],{"type":40,"tag":54,"props":1566,"children":1568},{"className":1567},[],[1569],{"type":45,"value":1570},"GRAFANA_TLS_CA_FILE",{"type":40,"tag":1337,"props":1572,"children":1573},{},[1574],{"type":45,"value":1575},"selected stack's TLS CA file",{"type":40,"tag":1337,"props":1577,"children":1578},{},[1579],{"type":45,"value":1580},"Custom CA bundle",{"type":40,"tag":1310,"props":1582,"children":1583},{},[1584,1593,1598],{"type":40,"tag":1337,"props":1585,"children":1586},{},[1587],{"type":40,"tag":54,"props":1588,"children":1590},{"className":1589},[],[1591],{"type":45,"value":1592},"GRAFANA_CLOUD_TOKEN",{"type":40,"tag":1337,"props":1594,"children":1595},{},[1596],{"type":45,"value":1597},"ephemeral Cloud entry",{"type":40,"tag":1337,"props":1599,"children":1600},{},[1601],{"type":45,"value":1602},"Cloud Access Policy token",{"type":40,"tag":1310,"props":1604,"children":1605},{},[1606,1615,1619],{"type":40,"tag":1337,"props":1607,"children":1608},{},[1609],{"type":40,"tag":54,"props":1610,"children":1612},{"className":1611},[],[1613],{"type":45,"value":1614},"GRAFANA_CLOUD_API_URL",{"type":40,"tag":1337,"props":1616,"children":1617},{},[1618],{"type":45,"value":1597},{"type":40,"tag":1337,"props":1620,"children":1621},{},[1622],{"type":45,"value":1623},"Cloud API endpoint",{"type":40,"tag":1310,"props":1625,"children":1626},{},[1627,1636,1640],{"type":40,"tag":1337,"props":1628,"children":1629},{},[1630],{"type":40,"tag":54,"props":1631,"children":1633},{"className":1632},[],[1634],{"type":45,"value":1635},"GRAFANA_CLOUD_OAUTH_URL",{"type":40,"tag":1337,"props":1637,"children":1638},{},[1639],{"type":45,"value":1597},{"type":40,"tag":1337,"props":1641,"children":1642},{},[1643],{"type":45,"value":1644},"Cloud OAuth endpoint",{"type":40,"tag":1310,"props":1646,"children":1647},{},[1648,1657,1662],{"type":40,"tag":1337,"props":1649,"children":1650},{},[1651],{"type":40,"tag":54,"props":1652,"children":1654},{"className":1653},[],[1655],{"type":45,"value":1656},"GRAFANA_CLOUD_STACK",{"type":40,"tag":1337,"props":1658,"children":1659},{},[1660],{"type":45,"value":1661},"selected stack's slug",{"type":40,"tag":1337,"props":1663,"children":1664},{},[1665],{"type":45,"value":1666},"Cloud stack slug",{"type":40,"tag":48,"props":1668,"children":1669},{},[1670],{"type":45,"value":1671},"When an endpoint override changes a credential destination, supply the\ncorresponding credential variable in the same invocation. Login commands turn\none supplied endpoint into a coherent OAuth\u002FAPI pair; set both endpoint\nvariables when a custom environment deliberately uses distinct origins.",{"type":40,"tag":48,"props":1673,"children":1674},{},[1675,1677,1683,1685,1691,1693,1699],{"type":45,"value":1676},"An auto-discovered repository ",{"type":40,"tag":54,"props":1678,"children":1680},{"className":1679},[],[1681],{"type":45,"value":1682},".gcx.yaml",{"type":45,"value":1684}," cannot attach runtime or freshly\nprompted credentials, or external mTLS client key files, to destinations and\ntransport settings supplied by that file. Review it and select it explicitly\nwith ",{"type":40,"tag":54,"props":1686,"children":1688},{"className":1687},[],[1689],{"type":45,"value":1690},"--config .gcx.yaml",{"type":45,"value":1692}," or ",{"type":40,"tag":54,"props":1694,"children":1696},{"className":1695},[],[1697],{"type":45,"value":1698},"GCX_CONFIG=.gcx.yaml",{"type":45,"value":1700}," before login or direct\nprovider authentication. Provider endpoint environment overrides also require\ntheir matching runtime credential and still do not authorize repository TLS or\nproxy settings.",{"type":40,"tag":406,"props":1702,"children":1704},{"id":1703},"example-github-actions",[1705],{"type":45,"value":1706},"Example: GitHub Actions",{"type":40,"tag":84,"props":1708,"children":1712},{"className":1709,"code":1710,"language":1711,"meta":89,"style":89},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","- name: Run gcx\n  env:\n    GRAFANA_SERVER: ${{ secrets.GRAFANA_SERVER }}\n    GRAFANA_TOKEN: ${{ secrets.GRAFANA_TOKEN }}\n    GRAFANA_ORG_ID: \"1\"\n  run: gcx resources get dashboards -o json\n","yaml",[1713],{"type":40,"tag":54,"props":1714,"children":1715},{"__ignoreMap":89},[1716,1740,1753,1770,1787,1812],{"type":40,"tag":95,"props":1717,"children":1718},{"class":97,"line":98},[1719,1724,1730,1735],{"type":40,"tag":95,"props":1720,"children":1721},{"style":154},[1722],{"type":45,"value":1723},"-",{"type":40,"tag":95,"props":1725,"children":1727},{"style":1726},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[1728],{"type":45,"value":1729}," name",{"type":40,"tag":95,"props":1731,"children":1732},{"style":154},[1733],{"type":45,"value":1734},":",{"type":40,"tag":95,"props":1736,"children":1737},{"style":108},[1738],{"type":45,"value":1739}," Run gcx\n",{"type":40,"tag":95,"props":1741,"children":1742},{"class":97,"line":448},[1743,1748],{"type":40,"tag":95,"props":1744,"children":1745},{"style":1726},[1746],{"type":45,"value":1747},"  env",{"type":40,"tag":95,"props":1749,"children":1750},{"style":154},[1751],{"type":45,"value":1752},":\n",{"type":40,"tag":95,"props":1754,"children":1755},{"class":97,"line":1229},[1756,1761,1765],{"type":40,"tag":95,"props":1757,"children":1758},{"style":1726},[1759],{"type":45,"value":1760},"    GRAFANA_SERVER",{"type":40,"tag":95,"props":1762,"children":1763},{"style":154},[1764],{"type":45,"value":1734},{"type":40,"tag":95,"props":1766,"children":1767},{"style":108},[1768],{"type":45,"value":1769}," ${{ secrets.GRAFANA_SERVER }}\n",{"type":40,"tag":95,"props":1771,"children":1772},{"class":97,"line":1239},[1773,1778,1782],{"type":40,"tag":95,"props":1774,"children":1775},{"style":1726},[1776],{"type":45,"value":1777},"    GRAFANA_TOKEN",{"type":40,"tag":95,"props":1779,"children":1780},{"style":154},[1781],{"type":45,"value":1734},{"type":40,"tag":95,"props":1783,"children":1784},{"style":108},[1785],{"type":45,"value":1786}," ${{ secrets.GRAFANA_TOKEN }}\n",{"type":40,"tag":95,"props":1788,"children":1789},{"class":97,"line":1248},[1790,1795,1799,1803,1808],{"type":40,"tag":95,"props":1791,"children":1792},{"style":1726},[1793],{"type":45,"value":1794},"    GRAFANA_ORG_ID",{"type":40,"tag":95,"props":1796,"children":1797},{"style":154},[1798],{"type":45,"value":1734},{"type":40,"tag":95,"props":1800,"children":1801},{"style":154},[1802],{"type":45,"value":208},{"type":40,"tag":95,"props":1804,"children":1805},{"style":108},[1806],{"type":45,"value":1807},"1",{"type":40,"tag":95,"props":1809,"children":1810},{"style":154},[1811],{"type":45,"value":295},{"type":40,"tag":95,"props":1813,"children":1815},{"class":97,"line":1814},6,[1816,1821,1825],{"type":40,"tag":95,"props":1817,"children":1818},{"style":1726},[1819],{"type":45,"value":1820},"  run",{"type":40,"tag":95,"props":1822,"children":1823},{"style":154},[1824],{"type":45,"value":1734},{"type":40,"tag":95,"props":1826,"children":1827},{"style":108},[1828],{"type":45,"value":1829}," gcx resources get dashboards -o json\n",{"type":40,"tag":48,"props":1831,"children":1832},{},[1833,1835,1840,1842,1848],{"type":45,"value":1834},"Environment variables apply to the ",{"type":40,"tag":510,"props":1836,"children":1837},{},[1838],{"type":45,"value":1839},"selected context",{"type":45,"value":1841}," only and do not modify\nthe config file on disk. ",{"type":40,"tag":54,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":45,"value":1847},"--context",{"type":45,"value":1849}," selection happens before these overrides,\nand write-back paths never serialize the env-mutated runtime object.",{"type":40,"tag":406,"props":1851,"children":1853},{"id":1852},"config-file-location",[1854],{"type":45,"value":1855},"Config file location",{"type":40,"tag":48,"props":1857,"children":1858},{},[1859],{"type":45,"value":1860},"To supply a config file path explicitly:",{"type":40,"tag":84,"props":1862,"children":1864},{"className":86,"code":1863,"language":88,"meta":89,"style":89},"gcx --config \u002Fpath\u002Fto\u002Fconfig.yaml resources get dashboards\n# or\nexport GCX_CONFIG=\u002Fpath\u002Fto\u002Fconfig.yaml\n",[1865],{"type":40,"tag":54,"props":1866,"children":1867},{"__ignoreMap":89},[1868,1900,1908],{"type":40,"tag":95,"props":1869,"children":1870},{"class":97,"line":98},[1871,1875,1880,1885,1890,1895],{"type":40,"tag":95,"props":1872,"children":1873},{"style":102},[1874],{"type":45,"value":105},{"type":40,"tag":95,"props":1876,"children":1877},{"style":108},[1878],{"type":45,"value":1879}," --config",{"type":40,"tag":95,"props":1881,"children":1882},{"style":108},[1883],{"type":45,"value":1884}," \u002Fpath\u002Fto\u002Fconfig.yaml",{"type":40,"tag":95,"props":1886,"children":1887},{"style":108},[1888],{"type":45,"value":1889}," resources",{"type":40,"tag":95,"props":1891,"children":1892},{"style":108},[1893],{"type":45,"value":1894}," get",{"type":40,"tag":95,"props":1896,"children":1897},{"style":108},[1898],{"type":45,"value":1899}," dashboards\n",{"type":40,"tag":95,"props":1901,"children":1902},{"class":97,"line":448},[1903],{"type":40,"tag":95,"props":1904,"children":1905},{"style":1198},[1906],{"type":45,"value":1907},"# or\n",{"type":40,"tag":95,"props":1909,"children":1910},{"class":97,"line":1229},[1911,1917,1922,1927],{"type":40,"tag":95,"props":1912,"children":1914},{"style":1913},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1915],{"type":45,"value":1916},"export",{"type":40,"tag":95,"props":1918,"children":1919},{"style":148},[1920],{"type":45,"value":1921}," GCX_CONFIG",{"type":40,"tag":95,"props":1923,"children":1924},{"style":154},[1925],{"type":45,"value":1926},"=",{"type":40,"tag":95,"props":1928,"children":1929},{"style":148},[1930],{"type":45,"value":1931},"\u002Fpath\u002Fto\u002Fconfig.yaml\n",{"type":40,"tag":48,"props":1933,"children":1934},{},[1935,1937,1942],{"type":45,"value":1936},"For the full config file search order, see\n",{"type":40,"tag":63,"props":1938,"children":1940},{"href":1939},"references\u002Fconfiguration.md#config-file-location",[1941],{"type":45,"value":68},{"type":45,"value":70},{"type":40,"tag":383,"props":1944,"children":1945},{},[],{"type":40,"tag":72,"props":1947,"children":1949},{"id":1948},"default-datasource-configuration",[1950],{"type":45,"value":1951},"Default Datasource Configuration",{"type":40,"tag":48,"props":1953,"children":1954},{},[1955,1957,1963],{"type":45,"value":1956},"To avoid passing ",{"type":40,"tag":54,"props":1958,"children":1960},{"className":1959},[],[1961],{"type":45,"value":1962},"-d \u003Cuid>",{"type":45,"value":1964}," on every query command, configure default\ndatasource UIDs for the active context.",{"type":40,"tag":406,"props":1966,"children":1968},{"id":1967},"find-your-datasource-uids",[1969],{"type":45,"value":1970},"Find your datasource UIDs",{"type":40,"tag":84,"props":1972,"children":1974},{"className":86,"code":1973,"language":88,"meta":89,"style":89},"gcx datasources list -o json\n",[1975],{"type":40,"tag":54,"props":1976,"children":1977},{"__ignoreMap":89},[1978],{"type":40,"tag":95,"props":1979,"children":1980},{"class":97,"line":98},[1981,1985,1990,1995,2000],{"type":40,"tag":95,"props":1982,"children":1983},{"style":102},[1984],{"type":45,"value":105},{"type":40,"tag":95,"props":1986,"children":1987},{"style":108},[1988],{"type":45,"value":1989}," datasources",{"type":40,"tag":95,"props":1991,"children":1992},{"style":108},[1993],{"type":45,"value":1994}," list",{"type":40,"tag":95,"props":1996,"children":1997},{"style":108},[1998],{"type":45,"value":1999}," -o",{"type":40,"tag":95,"props":2001,"children":2002},{"style":108},[2003],{"type":45,"value":2004}," json\n",{"type":40,"tag":48,"props":2006,"children":2007},{},[2008,2010,2016],{"type":45,"value":2009},"Locate the ",{"type":40,"tag":54,"props":2011,"children":2013},{"className":2012},[],[2014],{"type":45,"value":2015},"uid",{"type":45,"value":2017}," field for each datasource. Example output:",{"type":40,"tag":84,"props":2019,"children":2023},{"className":2020,"code":2021,"language":2022,"meta":89,"style":89},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"datasources\": [\n    { \"uid\": \"prometheus-uid-abc123\", \"name\": \"Prometheus\", \"type\": \"prometheus\" },\n    { \"uid\": \"loki-uid-def456\",       \"name\": \"Loki\",       \"type\": \"loki\"       }\n  ]\n}\n","json",[2024],{"type":40,"tag":54,"props":2025,"children":2026},{"__ignoreMap":89},[2027,2035,2061,2172,2280,2288],{"type":40,"tag":95,"props":2028,"children":2029},{"class":97,"line":98},[2030],{"type":40,"tag":95,"props":2031,"children":2032},{"style":154},[2033],{"type":45,"value":2034},"{\n",{"type":40,"tag":95,"props":2036,"children":2037},{"class":97,"line":448},[2038,2043,2048,2052,2056],{"type":40,"tag":95,"props":2039,"children":2040},{"style":154},[2041],{"type":45,"value":2042},"  \"",{"type":40,"tag":95,"props":2044,"children":2045},{"style":1913},[2046],{"type":45,"value":2047},"datasources",{"type":40,"tag":95,"props":2049,"children":2050},{"style":154},[2051],{"type":45,"value":218},{"type":40,"tag":95,"props":2053,"children":2054},{"style":154},[2055],{"type":45,"value":1734},{"type":40,"tag":95,"props":2057,"children":2058},{"style":154},[2059],{"type":45,"value":2060}," [\n",{"type":40,"tag":95,"props":2062,"children":2063},{"class":97,"line":1229},[2064,2069,2073,2077,2081,2085,2089,2094,2098,2103,2107,2112,2116,2120,2124,2129,2133,2137,2141,2146,2150,2154,2158,2163,2167],{"type":40,"tag":95,"props":2065,"children":2066},{"style":154},[2067],{"type":45,"value":2068},"    {",{"type":40,"tag":95,"props":2070,"children":2071},{"style":154},[2072],{"type":45,"value":208},{"type":40,"tag":95,"props":2074,"children":2075},{"style":102},[2076],{"type":45,"value":2015},{"type":40,"tag":95,"props":2078,"children":2079},{"style":154},[2080],{"type":45,"value":218},{"type":40,"tag":95,"props":2082,"children":2083},{"style":154},[2084],{"type":45,"value":1734},{"type":40,"tag":95,"props":2086,"children":2087},{"style":154},[2088],{"type":45,"value":208},{"type":40,"tag":95,"props":2090,"children":2091},{"style":108},[2092],{"type":45,"value":2093},"prometheus-uid-abc123",{"type":40,"tag":95,"props":2095,"children":2096},{"style":154},[2097],{"type":45,"value":218},{"type":40,"tag":95,"props":2099,"children":2100},{"style":154},[2101],{"type":45,"value":2102},",",{"type":40,"tag":95,"props":2104,"children":2105},{"style":154},[2106],{"type":45,"value":208},{"type":40,"tag":95,"props":2108,"children":2109},{"style":102},[2110],{"type":45,"value":2111},"name",{"type":40,"tag":95,"props":2113,"children":2114},{"style":154},[2115],{"type":45,"value":218},{"type":40,"tag":95,"props":2117,"children":2118},{"style":154},[2119],{"type":45,"value":1734},{"type":40,"tag":95,"props":2121,"children":2122},{"style":154},[2123],{"type":45,"value":208},{"type":40,"tag":95,"props":2125,"children":2126},{"style":108},[2127],{"type":45,"value":2128},"Prometheus",{"type":40,"tag":95,"props":2130,"children":2131},{"style":154},[2132],{"type":45,"value":218},{"type":40,"tag":95,"props":2134,"children":2135},{"style":154},[2136],{"type":45,"value":2102},{"type":40,"tag":95,"props":2138,"children":2139},{"style":154},[2140],{"type":45,"value":208},{"type":40,"tag":95,"props":2142,"children":2143},{"style":102},[2144],{"type":45,"value":2145},"type",{"type":40,"tag":95,"props":2147,"children":2148},{"style":154},[2149],{"type":45,"value":218},{"type":40,"tag":95,"props":2151,"children":2152},{"style":154},[2153],{"type":45,"value":1734},{"type":40,"tag":95,"props":2155,"children":2156},{"style":154},[2157],{"type":45,"value":208},{"type":40,"tag":95,"props":2159,"children":2160},{"style":108},[2161],{"type":45,"value":2162},"prometheus",{"type":40,"tag":95,"props":2164,"children":2165},{"style":154},[2166],{"type":45,"value":218},{"type":40,"tag":95,"props":2168,"children":2169},{"style":154},[2170],{"type":45,"value":2171}," },\n",{"type":40,"tag":95,"props":2173,"children":2174},{"class":97,"line":1239},[2175,2179,2183,2187,2191,2195,2199,2204,2208,2212,2217,2221,2225,2229,2233,2238,2242,2246,2250,2254,2258,2262,2266,2271,2275],{"type":40,"tag":95,"props":2176,"children":2177},{"style":154},[2178],{"type":45,"value":2068},{"type":40,"tag":95,"props":2180,"children":2181},{"style":154},[2182],{"type":45,"value":208},{"type":40,"tag":95,"props":2184,"children":2185},{"style":102},[2186],{"type":45,"value":2015},{"type":40,"tag":95,"props":2188,"children":2189},{"style":154},[2190],{"type":45,"value":218},{"type":40,"tag":95,"props":2192,"children":2193},{"style":154},[2194],{"type":45,"value":1734},{"type":40,"tag":95,"props":2196,"children":2197},{"style":154},[2198],{"type":45,"value":208},{"type":40,"tag":95,"props":2200,"children":2201},{"style":108},[2202],{"type":45,"value":2203},"loki-uid-def456",{"type":40,"tag":95,"props":2205,"children":2206},{"style":154},[2207],{"type":45,"value":218},{"type":40,"tag":95,"props":2209,"children":2210},{"style":154},[2211],{"type":45,"value":2102},{"type":40,"tag":95,"props":2213,"children":2214},{"style":154},[2215],{"type":45,"value":2216},"       \"",{"type":40,"tag":95,"props":2218,"children":2219},{"style":102},[2220],{"type":45,"value":2111},{"type":40,"tag":95,"props":2222,"children":2223},{"style":154},[2224],{"type":45,"value":218},{"type":40,"tag":95,"props":2226,"children":2227},{"style":154},[2228],{"type":45,"value":1734},{"type":40,"tag":95,"props":2230,"children":2231},{"style":154},[2232],{"type":45,"value":208},{"type":40,"tag":95,"props":2234,"children":2235},{"style":108},[2236],{"type":45,"value":2237},"Loki",{"type":40,"tag":95,"props":2239,"children":2240},{"style":154},[2241],{"type":45,"value":218},{"type":40,"tag":95,"props":2243,"children":2244},{"style":154},[2245],{"type":45,"value":2102},{"type":40,"tag":95,"props":2247,"children":2248},{"style":154},[2249],{"type":45,"value":2216},{"type":40,"tag":95,"props":2251,"children":2252},{"style":102},[2253],{"type":45,"value":2145},{"type":40,"tag":95,"props":2255,"children":2256},{"style":154},[2257],{"type":45,"value":218},{"type":40,"tag":95,"props":2259,"children":2260},{"style":154},[2261],{"type":45,"value":1734},{"type":40,"tag":95,"props":2263,"children":2264},{"style":154},[2265],{"type":45,"value":208},{"type":40,"tag":95,"props":2267,"children":2268},{"style":108},[2269],{"type":45,"value":2270},"loki",{"type":40,"tag":95,"props":2272,"children":2273},{"style":154},[2274],{"type":45,"value":218},{"type":40,"tag":95,"props":2276,"children":2277},{"style":154},[2278],{"type":45,"value":2279},"       }\n",{"type":40,"tag":95,"props":2281,"children":2282},{"class":97,"line":1248},[2283],{"type":40,"tag":95,"props":2284,"children":2285},{"style":154},[2286],{"type":45,"value":2287},"  ]\n",{"type":40,"tag":95,"props":2289,"children":2290},{"class":97,"line":1814},[2291],{"type":40,"tag":95,"props":2292,"children":2293},{"style":154},[2294],{"type":45,"value":2295},"}\n",{"type":40,"tag":406,"props":2297,"children":2299},{"id":2298},"set-defaults",[2300],{"type":45,"value":2301},"Set defaults",{"type":40,"tag":84,"props":2303,"children":2305},{"className":86,"code":2304,"language":88,"meta":89,"style":89},"# Set the default Prometheus datasource\ngcx config set contexts.cloud.datasources.prometheus prometheus-uid-abc123\n\n# Set the default Loki datasource\ngcx config set contexts.cloud.datasources.loki loki-uid-def456\n",[2306],{"type":40,"tag":54,"props":2307,"children":2308},{"__ignoreMap":89},[2309,2317,2342,2349,2357],{"type":40,"tag":95,"props":2310,"children":2311},{"class":97,"line":98},[2312],{"type":40,"tag":95,"props":2313,"children":2314},{"style":1198},[2315],{"type":45,"value":2316},"# Set the default Prometheus datasource\n",{"type":40,"tag":95,"props":2318,"children":2319},{"class":97,"line":448},[2320,2324,2328,2332,2337],{"type":40,"tag":95,"props":2321,"children":2322},{"style":102},[2323],{"type":45,"value":105},{"type":40,"tag":95,"props":2325,"children":2326},{"style":108},[2327],{"type":45,"value":430},{"type":40,"tag":95,"props":2329,"children":2330},{"style":108},[2331],{"type":45,"value":435},{"type":40,"tag":95,"props":2333,"children":2334},{"style":108},[2335],{"type":45,"value":2336}," contexts.cloud.datasources.prometheus",{"type":40,"tag":95,"props":2338,"children":2339},{"style":108},[2340],{"type":45,"value":2341}," prometheus-uid-abc123\n",{"type":40,"tag":95,"props":2343,"children":2344},{"class":97,"line":1229},[2345],{"type":40,"tag":95,"props":2346,"children":2347},{"emptyLinePlaceholder":1233},[2348],{"type":45,"value":1236},{"type":40,"tag":95,"props":2350,"children":2351},{"class":97,"line":1239},[2352],{"type":40,"tag":95,"props":2353,"children":2354},{"style":1198},[2355],{"type":45,"value":2356},"# Set the default Loki datasource\n",{"type":40,"tag":95,"props":2358,"children":2359},{"class":97,"line":1248},[2360,2364,2368,2372,2377],{"type":40,"tag":95,"props":2361,"children":2362},{"style":102},[2363],{"type":45,"value":105},{"type":40,"tag":95,"props":2365,"children":2366},{"style":108},[2367],{"type":45,"value":430},{"type":40,"tag":95,"props":2369,"children":2370},{"style":108},[2371],{"type":45,"value":435},{"type":40,"tag":95,"props":2373,"children":2374},{"style":108},[2375],{"type":45,"value":2376}," contexts.cloud.datasources.loki",{"type":40,"tag":95,"props":2378,"children":2379},{"style":108},[2380],{"type":45,"value":2381}," loki-uid-def456\n",{"type":40,"tag":48,"props":2383,"children":2384},{},[2385,2386,2391,2393,2399],{"type":45,"value":476},{"type":40,"tag":54,"props":2387,"children":2389},{"className":2388},[],[2390],{"type":45,"value":350},{"type":45,"value":2392}," with your context name and the UID values with those from the\noutput above. After setting these, query commands that support a ",{"type":40,"tag":54,"props":2394,"children":2396},{"className":2395},[],[2397],{"type":45,"value":2398},"-d",{"type":45,"value":2400}," flag will\nuse the configured defaults automatically.",{"type":40,"tag":383,"props":2402,"children":2403},{},[],{"type":40,"tag":72,"props":2405,"children":2407},{"id":2406},"multi-context-management",[2408],{"type":45,"value":2409},"Multi-Context Management",{"type":40,"tag":48,"props":2411,"children":2412},{},[2413],{"type":45,"value":2414},"To work with multiple Grafana environments, repeat Path A or B once per\nenvironment with a distinct context name, then:",{"type":40,"tag":84,"props":2416,"children":2418},{"className":86,"code":2417,"language":88,"meta":89,"style":89},"# Switch between contexts\ngcx config use-context staging\n\n# Use a context for a single command without switching\ngcx --context staging resources get dashboards\n\n# List all contexts (secrets redacted; add --raw to reveal)\ngcx config view\n",[2419],{"type":40,"tag":54,"props":2420,"children":2421},{"__ignoreMap":89},[2422,2430,2450,2457,2465,2494,2501,2510],{"type":40,"tag":95,"props":2423,"children":2424},{"class":97,"line":98},[2425],{"type":40,"tag":95,"props":2426,"children":2427},{"style":1198},[2428],{"type":45,"value":2429},"# Switch between contexts\n",{"type":40,"tag":95,"props":2431,"children":2432},{"class":97,"line":448},[2433,2437,2441,2445],{"type":40,"tag":95,"props":2434,"children":2435},{"style":102},[2436],{"type":45,"value":105},{"type":40,"tag":95,"props":2438,"children":2439},{"style":108},[2440],{"type":45,"value":430},{"type":40,"tag":95,"props":2442,"children":2443},{"style":108},[2444],{"type":45,"value":764},{"type":40,"tag":95,"props":2446,"children":2447},{"style":108},[2448],{"type":45,"value":2449}," staging\n",{"type":40,"tag":95,"props":2451,"children":2452},{"class":97,"line":1229},[2453],{"type":40,"tag":95,"props":2454,"children":2455},{"emptyLinePlaceholder":1233},[2456],{"type":45,"value":1236},{"type":40,"tag":95,"props":2458,"children":2459},{"class":97,"line":1239},[2460],{"type":40,"tag":95,"props":2461,"children":2462},{"style":1198},[2463],{"type":45,"value":2464},"# Use a context for a single command without switching\n",{"type":40,"tag":95,"props":2466,"children":2467},{"class":97,"line":1248},[2468,2472,2477,2482,2486,2490],{"type":40,"tag":95,"props":2469,"children":2470},{"style":102},[2471],{"type":45,"value":105},{"type":40,"tag":95,"props":2473,"children":2474},{"style":108},[2475],{"type":45,"value":2476}," --context",{"type":40,"tag":95,"props":2478,"children":2479},{"style":108},[2480],{"type":45,"value":2481}," staging",{"type":40,"tag":95,"props":2483,"children":2484},{"style":108},[2485],{"type":45,"value":1889},{"type":40,"tag":95,"props":2487,"children":2488},{"style":108},[2489],{"type":45,"value":1894},{"type":40,"tag":95,"props":2491,"children":2492},{"style":108},[2493],{"type":45,"value":1899},{"type":40,"tag":95,"props":2495,"children":2496},{"class":97,"line":1814},[2497],{"type":40,"tag":95,"props":2498,"children":2499},{"emptyLinePlaceholder":1233},[2500],{"type":45,"value":1236},{"type":40,"tag":95,"props":2502,"children":2504},{"class":97,"line":2503},7,[2505],{"type":40,"tag":95,"props":2506,"children":2507},{"style":1198},[2508],{"type":45,"value":2509},"# List all contexts (secrets redacted; add --raw to reveal)\n",{"type":40,"tag":95,"props":2511,"children":2513},{"class":97,"line":2512},8,[2514,2518,2522],{"type":40,"tag":95,"props":2515,"children":2516},{"style":102},[2517],{"type":45,"value":105},{"type":40,"tag":95,"props":2519,"children":2520},{"style":108},[2521],{"type":45,"value":430},{"type":40,"tag":95,"props":2523,"children":2524},{"style":108},[2525],{"type":45,"value":2526}," view\n",{"type":40,"tag":48,"props":2528,"children":2529},{},[2530,2532,2537],{"type":45,"value":2531},"For create\u002Fupdate\u002Fremove patterns, see\n",{"type":40,"tag":63,"props":2533,"children":2535},{"href":2534},"references\u002Fconfiguration.md#multi-context-management",[2536],{"type":45,"value":68},{"type":45,"value":70},{"type":40,"tag":383,"props":2539,"children":2540},{},[],{"type":40,"tag":72,"props":2542,"children":2544},{"id":2543},"troubleshooting",[2545],{"type":45,"value":2546},"Troubleshooting",{"type":40,"tag":406,"props":2548,"children":2550},{"id":2549},"config-check-fails",[2551],{"type":45,"value":2552},"config check fails",{"type":40,"tag":48,"props":2554,"children":2555},{},[2556,2558,2563],{"type":45,"value":2557},"Run ",{"type":40,"tag":54,"props":2559,"children":2561},{"className":2560},[],[2562],{"type":45,"value":379},{"type":45,"value":2564}," to diagnose configuration problems. It prints the\nactive context and performs a live health check against the server.",{"type":40,"tag":48,"props":2566,"children":2567},{},[2568],{"type":45,"value":2569},"If it reports a missing server or empty context:",{"type":40,"tag":84,"props":2571,"children":2573},{"className":86,"code":2572,"language":88,"meta":89,"style":89},"# Verify current context is set\ngcx config view\n\n# Ensure the current-context field is not empty\ngcx config set current-context \u003Cyour-context-name>\n",[2574],{"type":40,"tag":54,"props":2575,"children":2576},{"__ignoreMap":89},[2577,2585,2600,2607,2615],{"type":40,"tag":95,"props":2578,"children":2579},{"class":97,"line":98},[2580],{"type":40,"tag":95,"props":2581,"children":2582},{"style":1198},[2583],{"type":45,"value":2584},"# Verify current context is set\n",{"type":40,"tag":95,"props":2586,"children":2587},{"class":97,"line":448},[2588,2592,2596],{"type":40,"tag":95,"props":2589,"children":2590},{"style":102},[2591],{"type":45,"value":105},{"type":40,"tag":95,"props":2593,"children":2594},{"style":108},[2595],{"type":45,"value":430},{"type":40,"tag":95,"props":2597,"children":2598},{"style":108},[2599],{"type":45,"value":2526},{"type":40,"tag":95,"props":2601,"children":2602},{"class":97,"line":1229},[2603],{"type":40,"tag":95,"props":2604,"children":2605},{"emptyLinePlaceholder":1233},[2606],{"type":45,"value":1236},{"type":40,"tag":95,"props":2608,"children":2609},{"class":97,"line":1239},[2610],{"type":40,"tag":95,"props":2611,"children":2612},{"style":1198},[2613],{"type":45,"value":2614},"# Ensure the current-context field is not empty\n",{"type":40,"tag":95,"props":2616,"children":2617},{"class":97,"line":1248},[2618,2622,2626,2630,2635,2639,2644,2649],{"type":40,"tag":95,"props":2619,"children":2620},{"style":102},[2621],{"type":45,"value":105},{"type":40,"tag":95,"props":2623,"children":2624},{"style":108},[2625],{"type":45,"value":430},{"type":40,"tag":95,"props":2627,"children":2628},{"style":108},[2629],{"type":45,"value":435},{"type":40,"tag":95,"props":2631,"children":2632},{"style":108},[2633],{"type":45,"value":2634}," current-context",{"type":40,"tag":95,"props":2636,"children":2637},{"style":154},[2638],{"type":45,"value":1271},{"type":40,"tag":95,"props":2640,"children":2641},{"style":108},[2642],{"type":45,"value":2643},"your-context-nam",{"type":40,"tag":95,"props":2645,"children":2646},{"style":148},[2647],{"type":45,"value":2648},"e",{"type":40,"tag":95,"props":2650,"children":2651},{"style":154},[2652],{"type":45,"value":1286},{"type":40,"tag":48,"props":2654,"children":2655},{},[2656],{"type":45,"value":2657},"If it reports a missing namespace (stack ID or org ID):",{"type":40,"tag":2659,"props":2660,"children":2661},"ul",{},[2662,2687],{"type":40,"tag":2663,"props":2664,"children":2665},"li",{},[2666,2671,2673,2678,2680,2685],{"type":40,"tag":510,"props":2667,"children":2668},{},[2669],{"type":45,"value":2670},"Grafana Cloud",{"type":45,"value":2672},": either let auto-discovery resolve it (no manual action\nneeded for ",{"type":40,"tag":54,"props":2674,"children":2676},{"className":2675},[],[2677],{"type":45,"value":402},{"type":45,"value":2679}," URLs) or set ",{"type":40,"tag":54,"props":2681,"children":2683},{"className":2682},[],[2684],{"type":45,"value":816},{"type":45,"value":2686}," explicitly.",{"type":40,"tag":2663,"props":2688,"children":2689},{},[2690,2695,2697,2702,2704,2709],{"type":40,"tag":510,"props":2691,"children":2692},{},[2693],{"type":45,"value":2694},"On-premise",{"type":45,"value":2696},": set ",{"type":40,"tag":54,"props":2698,"children":2700},{"className":2699},[],[2701],{"type":45,"value":1461},{"type":45,"value":2703}," to the numeric org ID (usually ",{"type":40,"tag":54,"props":2705,"children":2707},{"className":2706},[],[2708],{"type":45,"value":1807},{"type":45,"value":404},{"type":40,"tag":406,"props":2711,"children":2713},{"id":2712},"_401-unauthorized",[2714],{"type":45,"value":2715},"401 Unauthorized",{"type":40,"tag":48,"props":2717,"children":2718},{},[2719],{"type":45,"value":2720},"The token or credentials are invalid or expired.",{"type":40,"tag":84,"props":2722,"children":2724},{"className":86,"code":2723,"language":88,"meta":89,"style":89},"# Replace with a fresh token\ngcx config set stacks.\u003Cname>.grafana.token glsa_NEW_TOKEN\n",[2725],{"type":40,"tag":54,"props":2726,"children":2727},{"__ignoreMap":89},[2728,2736],{"type":40,"tag":95,"props":2729,"children":2730},{"class":97,"line":98},[2731],{"type":40,"tag":95,"props":2732,"children":2733},{"style":1198},[2734],{"type":45,"value":2735},"# Replace with a fresh token\n",{"type":40,"tag":95,"props":2737,"children":2738},{"class":97,"line":448},[2739,2743,2747,2751,2756,2761,2766,2770,2775,2780],{"type":40,"tag":95,"props":2740,"children":2741},{"style":102},[2742],{"type":45,"value":105},{"type":40,"tag":95,"props":2744,"children":2745},{"style":108},[2746],{"type":45,"value":430},{"type":40,"tag":95,"props":2748,"children":2749},{"style":108},[2750],{"type":45,"value":435},{"type":40,"tag":95,"props":2752,"children":2753},{"style":108},[2754],{"type":45,"value":2755}," stacks.",{"type":40,"tag":95,"props":2757,"children":2758},{"style":154},[2759],{"type":45,"value":2760},"\u003C",{"type":40,"tag":95,"props":2762,"children":2763},{"style":108},[2764],{"type":45,"value":2765},"nam",{"type":40,"tag":95,"props":2767,"children":2768},{"style":148},[2769],{"type":45,"value":2648},{"type":40,"tag":95,"props":2771,"children":2772},{"style":154},[2773],{"type":45,"value":2774},">",{"type":40,"tag":95,"props":2776,"children":2777},{"style":108},[2778],{"type":45,"value":2779},".grafana.token",{"type":40,"tag":95,"props":2781,"children":2782},{"style":108},[2783],{"type":45,"value":2784}," glsa_NEW_TOKEN\n",{"type":40,"tag":48,"props":2786,"children":2787},{},[2788],{"type":45,"value":2789},"Verify the token has not expired and has the correct permissions for the\noperations you intend to run.",{"type":40,"tag":406,"props":2791,"children":2793},{"id":2792},"_403-forbidden",[2794],{"type":45,"value":2795},"403 Forbidden",{"type":40,"tag":48,"props":2797,"children":2798},{},[2799,2801,2805],{"type":45,"value":2800},"The token is valid but lacks permissions for the requested operation. In\nGrafana, navigate to ",{"type":40,"tag":510,"props":2802,"children":2803},{},[2804],{"type":45,"value":616},{"type":45,"value":2806},", select the service\naccount, and assign an appropriate role (Viewer, Editor, or Admin).",{"type":40,"tag":406,"props":2808,"children":2810},{"id":2809},"connection-refused-or-timeout",[2811],{"type":45,"value":2812},"Connection refused or timeout",{"type":40,"tag":48,"props":2814,"children":2815},{},[2816],{"type":45,"value":2817},"The server URL is unreachable.",{"type":40,"tag":2819,"props":2820,"children":2821},"ol",{},[2822,2849,2879],{"type":40,"tag":2663,"props":2823,"children":2824},{},[2825,2827],{"type":45,"value":2826},"Confirm the URL is correct:",{"type":40,"tag":84,"props":2828,"children":2830},{"className":86,"code":2829,"language":88,"meta":89,"style":89},"gcx config view\n",[2831],{"type":40,"tag":54,"props":2832,"children":2833},{"__ignoreMap":89},[2834],{"type":40,"tag":95,"props":2835,"children":2836},{"class":97,"line":98},[2837,2841,2845],{"type":40,"tag":95,"props":2838,"children":2839},{"style":102},[2840],{"type":45,"value":105},{"type":40,"tag":95,"props":2842,"children":2843},{"style":108},[2844],{"type":45,"value":430},{"type":40,"tag":95,"props":2846,"children":2847},{"style":108},[2848],{"type":45,"value":2526},{"type":40,"tag":2663,"props":2850,"children":2851},{},[2852,2854],{"type":45,"value":2853},"Test connectivity from the machine running gcx:",{"type":40,"tag":84,"props":2855,"children":2857},{"className":86,"code":2856,"language":88,"meta":89,"style":89},"curl -I https:\u002F\u002Fgrafana.example.com\u002Fapi\u002Fhealth\n",[2858],{"type":40,"tag":54,"props":2859,"children":2860},{"__ignoreMap":89},[2861],{"type":40,"tag":95,"props":2862,"children":2863},{"class":97,"line":98},[2864,2869,2874],{"type":40,"tag":95,"props":2865,"children":2866},{"style":102},[2867],{"type":45,"value":2868},"curl",{"type":40,"tag":95,"props":2870,"children":2871},{"style":108},[2872],{"type":45,"value":2873}," -I",{"type":40,"tag":95,"props":2875,"children":2876},{"style":108},[2877],{"type":45,"value":2878}," https:\u002F\u002Fgrafana.example.com\u002Fapi\u002Fhealth\n",{"type":40,"tag":2663,"props":2880,"children":2881},{},[2882,2884,2935,2939,2940,2946],{"type":45,"value":2883},"Check for proxy requirements or VPN. If the instance uses a self-signed\ncertificate:",{"type":40,"tag":84,"props":2885,"children":2887},{"className":86,"code":2886,"language":88,"meta":89,"style":89},"gcx config set stacks.\u003Cname>.grafana.tls.insecure-skip-verify true\n",[2888],{"type":40,"tag":54,"props":2889,"children":2890},{"__ignoreMap":89},[2891],{"type":40,"tag":95,"props":2892,"children":2893},{"class":97,"line":98},[2894,2898,2902,2906,2910,2914,2918,2922,2926,2931],{"type":40,"tag":95,"props":2895,"children":2896},{"style":102},[2897],{"type":45,"value":105},{"type":40,"tag":95,"props":2899,"children":2900},{"style":108},[2901],{"type":45,"value":430},{"type":40,"tag":95,"props":2903,"children":2904},{"style":108},[2905],{"type":45,"value":435},{"type":40,"tag":95,"props":2907,"children":2908},{"style":108},[2909],{"type":45,"value":2755},{"type":40,"tag":95,"props":2911,"children":2912},{"style":154},[2913],{"type":45,"value":2760},{"type":40,"tag":95,"props":2915,"children":2916},{"style":108},[2917],{"type":45,"value":2765},{"type":40,"tag":95,"props":2919,"children":2920},{"style":148},[2921],{"type":45,"value":2648},{"type":40,"tag":95,"props":2923,"children":2924},{"style":154},[2925],{"type":45,"value":2774},{"type":40,"tag":95,"props":2927,"children":2928},{"style":108},[2929],{"type":45,"value":2930},".grafana.tls.insecure-skip-verify",{"type":40,"tag":95,"props":2932,"children":2933},{"style":154},[2934],{"type":45,"value":1226},{"type":40,"tag":2936,"props":2937,"children":2938},"br",{},[],{"type":45,"value":365},{"type":40,"tag":54,"props":2941,"children":2943},{"className":2942},[],[2944],{"type":45,"value":2945},"insecure-skip-verify",{"type":45,"value":2947}," only for development; supply a CA certificate in\nproduction environments instead.",{"type":40,"tag":406,"props":2949,"children":2951},{"id":2950},"namespace-resolution-issues",[2952],{"type":45,"value":836},{"type":40,"tag":48,"props":2954,"children":2955},{},[2956],{"type":45,"value":2957},"gcx resolves the API namespace (Kubernetes namespace for all calls) in\nthis order:",{"type":40,"tag":2819,"props":2959,"children":2960},{},[2961,2973,2994],{"type":40,"tag":2663,"props":2962,"children":2963},{},[2964,2966,2971],{"type":45,"value":2965},"Attempt auto-discovery via ",{"type":40,"tag":54,"props":2967,"children":2969},{"className":2968},[],[2970],{"type":45,"value":808},{"type":45,"value":2972}," HTTP call to the server",{"type":40,"tag":2663,"props":2974,"children":2975},{},[2976,2978,2984,2986,2992],{"type":45,"value":2977},"If discovery fails and ",{"type":40,"tag":54,"props":2979,"children":2981},{"className":2980},[],[2982],{"type":45,"value":2983},"org-id",{"type":45,"value":2985}," is non-zero: use ",{"type":40,"tag":54,"props":2987,"children":2989},{"className":2988},[],[2990],{"type":45,"value":2991},"org-\u003Cid>",{"type":45,"value":2993}," namespace",{"type":40,"tag":2663,"props":2995,"children":2996},{},[2997,2998,3003,3005],{"type":45,"value":2977},{"type":40,"tag":54,"props":2999,"children":3001},{"className":3000},[],[3002],{"type":45,"value":2983},{"type":45,"value":3004}," is zero: use configured ",{"type":40,"tag":54,"props":3006,"children":3008},{"className":3007},[],[3009],{"type":45,"value":3010},"stack-id",{"type":40,"tag":48,"props":3012,"children":3013},{},[3014,3016,3021],{"type":45,"value":3015},"If you see a \"mismatched stack ID\" error, a configured ",{"type":40,"tag":54,"props":3017,"children":3019},{"className":3018},[],[3020],{"type":45,"value":816},{"type":45,"value":3022},"\ndiffers from the auto-discovered value. Resolve by unsetting the manual value:",{"type":40,"tag":84,"props":3024,"children":3026},{"className":86,"code":3025,"language":88,"meta":89,"style":89},"gcx config unset stacks.\u003Cname>.grafana.stack-id\n",[3027],{"type":40,"tag":54,"props":3028,"children":3029},{"__ignoreMap":89},[3030],{"type":40,"tag":95,"props":3031,"children":3032},{"class":97,"line":98},[3033,3037,3041,3046,3050,3054,3058,3062,3066],{"type":40,"tag":95,"props":3034,"children":3035},{"style":102},[3036],{"type":45,"value":105},{"type":40,"tag":95,"props":3038,"children":3039},{"style":108},[3040],{"type":45,"value":430},{"type":40,"tag":95,"props":3042,"children":3043},{"style":108},[3044],{"type":45,"value":3045}," unset",{"type":40,"tag":95,"props":3047,"children":3048},{"style":108},[3049],{"type":45,"value":2755},{"type":40,"tag":95,"props":3051,"children":3052},{"style":154},[3053],{"type":45,"value":2760},{"type":40,"tag":95,"props":3055,"children":3056},{"style":108},[3057],{"type":45,"value":2765},{"type":40,"tag":95,"props":3059,"children":3060},{"style":148},[3061],{"type":45,"value":2648},{"type":40,"tag":95,"props":3063,"children":3064},{"style":154},[3065],{"type":45,"value":2774},{"type":40,"tag":95,"props":3067,"children":3068},{"style":108},[3069],{"type":45,"value":3070},".grafana.stack-id\n",{"type":40,"tag":48,"props":3072,"children":3073},{},[3074,3076,3081],{"type":45,"value":3075},"If you see a \"missing namespace\" error and auto-discovery is failing (e.g.,\nthe server does not expose ",{"type":40,"tag":54,"props":3077,"children":3079},{"className":3078},[],[3080],{"type":45,"value":808},{"type":45,"value":3082},"), set the namespace manually:",{"type":40,"tag":84,"props":3084,"children":3086},{"className":86,"code":3085,"language":88,"meta":89,"style":89},"# On-premise\ngcx config set stacks.\u003Cname>.grafana.org-id 1\n\n# Grafana Cloud (if auto-discovery is unavailable)\ngcx config set stacks.\u003Cname>.grafana.stack-id 12345\n",[3087],{"type":40,"tag":54,"props":3088,"children":3089},{"__ignoreMap":89},[3090,3098,3142,3149,3157],{"type":40,"tag":95,"props":3091,"children":3092},{"class":97,"line":98},[3093],{"type":40,"tag":95,"props":3094,"children":3095},{"style":1198},[3096],{"type":45,"value":3097},"# On-premise\n",{"type":40,"tag":95,"props":3099,"children":3100},{"class":97,"line":448},[3101,3105,3109,3113,3117,3121,3125,3129,3133,3138],{"type":40,"tag":95,"props":3102,"children":3103},{"style":102},[3104],{"type":45,"value":105},{"type":40,"tag":95,"props":3106,"children":3107},{"style":108},[3108],{"type":45,"value":430},{"type":40,"tag":95,"props":3110,"children":3111},{"style":108},[3112],{"type":45,"value":435},{"type":40,"tag":95,"props":3114,"children":3115},{"style":108},[3116],{"type":45,"value":2755},{"type":40,"tag":95,"props":3118,"children":3119},{"style":154},[3120],{"type":45,"value":2760},{"type":40,"tag":95,"props":3122,"children":3123},{"style":108},[3124],{"type":45,"value":2765},{"type":40,"tag":95,"props":3126,"children":3127},{"style":148},[3128],{"type":45,"value":2648},{"type":40,"tag":95,"props":3130,"children":3131},{"style":154},[3132],{"type":45,"value":2774},{"type":40,"tag":95,"props":3134,"children":3135},{"style":108},[3136],{"type":45,"value":3137},".grafana.org-id",{"type":40,"tag":95,"props":3139,"children":3140},{"style":195},[3141],{"type":45,"value":1104},{"type":40,"tag":95,"props":3143,"children":3144},{"class":97,"line":1229},[3145],{"type":40,"tag":95,"props":3146,"children":3147},{"emptyLinePlaceholder":1233},[3148],{"type":45,"value":1236},{"type":40,"tag":95,"props":3150,"children":3151},{"class":97,"line":1239},[3152],{"type":40,"tag":95,"props":3153,"children":3154},{"style":1198},[3155],{"type":45,"value":3156},"# Grafana Cloud (if auto-discovery is unavailable)\n",{"type":40,"tag":95,"props":3158,"children":3159},{"class":97,"line":1248},[3160,3164,3168,3172,3176,3180,3184,3188,3192,3197],{"type":40,"tag":95,"props":3161,"children":3162},{"style":102},[3163],{"type":45,"value":105},{"type":40,"tag":95,"props":3165,"children":3166},{"style":108},[3167],{"type":45,"value":430},{"type":40,"tag":95,"props":3169,"children":3170},{"style":108},[3171],{"type":45,"value":435},{"type":40,"tag":95,"props":3173,"children":3174},{"style":108},[3175],{"type":45,"value":2755},{"type":40,"tag":95,"props":3177,"children":3178},{"style":154},[3179],{"type":45,"value":2760},{"type":40,"tag":95,"props":3181,"children":3182},{"style":108},[3183],{"type":45,"value":2765},{"type":40,"tag":95,"props":3185,"children":3186},{"style":148},[3187],{"type":45,"value":2648},{"type":40,"tag":95,"props":3189,"children":3190},{"style":154},[3191],{"type":45,"value":2774},{"type":40,"tag":95,"props":3193,"children":3194},{"style":108},[3195],{"type":45,"value":3196},".grafana.stack-id",{"type":40,"tag":95,"props":3198,"children":3199},{"style":195},[3200],{"type":45,"value":3201}," 12345\n",{"type":40,"tag":383,"props":3203,"children":3204},{},[],{"type":40,"tag":72,"props":3206,"children":3208},{"id":3207},"complete-example-grafana-cloud-with-a-service-account-token",[3209],{"type":45,"value":3210},"Complete Example: Grafana Cloud with a Service Account Token",{"type":40,"tag":84,"props":3212,"children":3214},{"className":86,"code":3213,"language":88,"meta":89,"style":89},"# 1. Set server and token on a stack, and bind a context to it\ngcx config set stacks.mycloud.grafana.server https:\u002F\u002Fmyorg.grafana.net\ngcx config set stacks.mycloud.grafana.token glsa_XXXXXXXXXXXXXXXX\ngcx config set contexts.mycloud.stack mycloud\n\n# 2. Activate the context\ngcx config use-context mycloud\n\n# 3. Verify\ngcx config check\n\n# 4. Set default datasources (after listing available ones)\ngcx datasources list -o json\ngcx config set contexts.mycloud.datasources.prometheus \u003Cprometheus-uid>\ngcx config set contexts.mycloud.datasources.loki \u003Cloki-uid>\n\n# 5. Test a resource listing\ngcx resources get dashboards -o json\n",[3215],{"type":40,"tag":54,"props":3216,"children":3217},{"__ignoreMap":89},[3218,3226,3250,3274,3299,3306,3314,3333,3340,3349,3365,3373,3382,3406,3445,3483,3491,3500],{"type":40,"tag":95,"props":3219,"children":3220},{"class":97,"line":98},[3221],{"type":40,"tag":95,"props":3222,"children":3223},{"style":1198},[3224],{"type":45,"value":3225},"# 1. Set server and token on a stack, and bind a context to it\n",{"type":40,"tag":95,"props":3227,"children":3228},{"class":97,"line":448},[3229,3233,3237,3241,3246],{"type":40,"tag":95,"props":3230,"children":3231},{"style":102},[3232],{"type":45,"value":105},{"type":40,"tag":95,"props":3234,"children":3235},{"style":108},[3236],{"type":45,"value":430},{"type":40,"tag":95,"props":3238,"children":3239},{"style":108},[3240],{"type":45,"value":435},{"type":40,"tag":95,"props":3242,"children":3243},{"style":108},[3244],{"type":45,"value":3245}," stacks.mycloud.grafana.server",{"type":40,"tag":95,"props":3247,"children":3248},{"style":108},[3249],{"type":45,"value":445},{"type":40,"tag":95,"props":3251,"children":3252},{"class":97,"line":1229},[3253,3257,3261,3265,3270],{"type":40,"tag":95,"props":3254,"children":3255},{"style":102},[3256],{"type":45,"value":105},{"type":40,"tag":95,"props":3258,"children":3259},{"style":108},[3260],{"type":45,"value":430},{"type":40,"tag":95,"props":3262,"children":3263},{"style":108},[3264],{"type":45,"value":435},{"type":40,"tag":95,"props":3266,"children":3267},{"style":108},[3268],{"type":45,"value":3269}," stacks.mycloud.grafana.token",{"type":40,"tag":95,"props":3271,"children":3272},{"style":108},[3273],{"type":45,"value":606},{"type":40,"tag":95,"props":3275,"children":3276},{"class":97,"line":1239},[3277,3281,3285,3289,3294],{"type":40,"tag":95,"props":3278,"children":3279},{"style":102},[3280],{"type":45,"value":105},{"type":40,"tag":95,"props":3282,"children":3283},{"style":108},[3284],{"type":45,"value":430},{"type":40,"tag":95,"props":3286,"children":3287},{"style":108},[3288],{"type":45,"value":435},{"type":40,"tag":95,"props":3290,"children":3291},{"style":108},[3292],{"type":45,"value":3293}," contexts.mycloud.stack",{"type":40,"tag":95,"props":3295,"children":3296},{"style":108},[3297],{"type":45,"value":3298}," mycloud\n",{"type":40,"tag":95,"props":3300,"children":3301},{"class":97,"line":1248},[3302],{"type":40,"tag":95,"props":3303,"children":3304},{"emptyLinePlaceholder":1233},[3305],{"type":45,"value":1236},{"type":40,"tag":95,"props":3307,"children":3308},{"class":97,"line":1814},[3309],{"type":40,"tag":95,"props":3310,"children":3311},{"style":1198},[3312],{"type":45,"value":3313},"# 2. Activate the context\n",{"type":40,"tag":95,"props":3315,"children":3316},{"class":97,"line":2503},[3317,3321,3325,3329],{"type":40,"tag":95,"props":3318,"children":3319},{"style":102},[3320],{"type":45,"value":105},{"type":40,"tag":95,"props":3322,"children":3323},{"style":108},[3324],{"type":45,"value":430},{"type":40,"tag":95,"props":3326,"children":3327},{"style":108},[3328],{"type":45,"value":764},{"type":40,"tag":95,"props":3330,"children":3331},{"style":108},[3332],{"type":45,"value":3298},{"type":40,"tag":95,"props":3334,"children":3335},{"class":97,"line":2512},[3336],{"type":40,"tag":95,"props":3337,"children":3338},{"emptyLinePlaceholder":1233},[3339],{"type":45,"value":1236},{"type":40,"tag":95,"props":3341,"children":3343},{"class":97,"line":3342},9,[3344],{"type":40,"tag":95,"props":3345,"children":3346},{"style":1198},[3347],{"type":45,"value":3348},"# 3. Verify\n",{"type":40,"tag":95,"props":3350,"children":3352},{"class":97,"line":3351},10,[3353,3357,3361],{"type":40,"tag":95,"props":3354,"children":3355},{"style":102},[3356],{"type":45,"value":105},{"type":40,"tag":95,"props":3358,"children":3359},{"style":108},[3360],{"type":45,"value":430},{"type":40,"tag":95,"props":3362,"children":3363},{"style":108},[3364],{"type":45,"value":797},{"type":40,"tag":95,"props":3366,"children":3368},{"class":97,"line":3367},11,[3369],{"type":40,"tag":95,"props":3370,"children":3371},{"emptyLinePlaceholder":1233},[3372],{"type":45,"value":1236},{"type":40,"tag":95,"props":3374,"children":3376},{"class":97,"line":3375},12,[3377],{"type":40,"tag":95,"props":3378,"children":3379},{"style":1198},[3380],{"type":45,"value":3381},"# 4. Set default datasources (after listing available ones)\n",{"type":40,"tag":95,"props":3383,"children":3385},{"class":97,"line":3384},13,[3386,3390,3394,3398,3402],{"type":40,"tag":95,"props":3387,"children":3388},{"style":102},[3389],{"type":45,"value":105},{"type":40,"tag":95,"props":3391,"children":3392},{"style":108},[3393],{"type":45,"value":1989},{"type":40,"tag":95,"props":3395,"children":3396},{"style":108},[3397],{"type":45,"value":1994},{"type":40,"tag":95,"props":3399,"children":3400},{"style":108},[3401],{"type":45,"value":1999},{"type":40,"tag":95,"props":3403,"children":3404},{"style":108},[3405],{"type":45,"value":2004},{"type":40,"tag":95,"props":3407,"children":3409},{"class":97,"line":3408},14,[3410,3414,3418,3422,3427,3431,3436,3441],{"type":40,"tag":95,"props":3411,"children":3412},{"style":102},[3413],{"type":45,"value":105},{"type":40,"tag":95,"props":3415,"children":3416},{"style":108},[3417],{"type":45,"value":430},{"type":40,"tag":95,"props":3419,"children":3420},{"style":108},[3421],{"type":45,"value":435},{"type":40,"tag":95,"props":3423,"children":3424},{"style":108},[3425],{"type":45,"value":3426}," contexts.mycloud.datasources.prometheus",{"type":40,"tag":95,"props":3428,"children":3429},{"style":154},[3430],{"type":45,"value":1271},{"type":40,"tag":95,"props":3432,"children":3433},{"style":108},[3434],{"type":45,"value":3435},"prometheus-ui",{"type":40,"tag":95,"props":3437,"children":3438},{"style":148},[3439],{"type":45,"value":3440},"d",{"type":40,"tag":95,"props":3442,"children":3443},{"style":154},[3444],{"type":45,"value":1286},{"type":40,"tag":95,"props":3446,"children":3448},{"class":97,"line":3447},15,[3449,3453,3457,3461,3466,3470,3475,3479],{"type":40,"tag":95,"props":3450,"children":3451},{"style":102},[3452],{"type":45,"value":105},{"type":40,"tag":95,"props":3454,"children":3455},{"style":108},[3456],{"type":45,"value":430},{"type":40,"tag":95,"props":3458,"children":3459},{"style":108},[3460],{"type":45,"value":435},{"type":40,"tag":95,"props":3462,"children":3463},{"style":108},[3464],{"type":45,"value":3465}," contexts.mycloud.datasources.loki",{"type":40,"tag":95,"props":3467,"children":3468},{"style":154},[3469],{"type":45,"value":1271},{"type":40,"tag":95,"props":3471,"children":3472},{"style":108},[3473],{"type":45,"value":3474},"loki-ui",{"type":40,"tag":95,"props":3476,"children":3477},{"style":148},[3478],{"type":45,"value":3440},{"type":40,"tag":95,"props":3480,"children":3481},{"style":154},[3482],{"type":45,"value":1286},{"type":40,"tag":95,"props":3484,"children":3486},{"class":97,"line":3485},16,[3487],{"type":40,"tag":95,"props":3488,"children":3489},{"emptyLinePlaceholder":1233},[3490],{"type":45,"value":1236},{"type":40,"tag":95,"props":3492,"children":3494},{"class":97,"line":3493},17,[3495],{"type":40,"tag":95,"props":3496,"children":3497},{"style":1198},[3498],{"type":45,"value":3499},"# 5. Test a resource listing\n",{"type":40,"tag":95,"props":3501,"children":3503},{"class":97,"line":3502},18,[3504,3508,3512,3516,3521,3525],{"type":40,"tag":95,"props":3505,"children":3506},{"style":102},[3507],{"type":45,"value":105},{"type":40,"tag":95,"props":3509,"children":3510},{"style":108},[3511],{"type":45,"value":1889},{"type":40,"tag":95,"props":3513,"children":3514},{"style":108},[3515],{"type":45,"value":1894},{"type":40,"tag":95,"props":3517,"children":3518},{"style":108},[3519],{"type":45,"value":3520}," dashboards",{"type":40,"tag":95,"props":3522,"children":3523},{"style":108},[3524],{"type":45,"value":1999},{"type":40,"tag":95,"props":3526,"children":3527},{"style":108},[3528],{"type":45,"value":2004},{"type":40,"tag":383,"props":3530,"children":3531},{},[],{"type":40,"tag":72,"props":3533,"children":3535},{"id":3534},"reference",[3536],{"type":45,"value":3537},"Reference",{"type":40,"tag":48,"props":3539,"children":3540},{},[3541,3543,3547],{"type":45,"value":3542},"For all config set paths, TLS fields, environment variables, namespace\nresolution rules, and multi-context patterns, see\n",{"type":40,"tag":63,"props":3544,"children":3545},{"href":65},[3546],{"type":45,"value":68},{"type":45,"value":70},{"type":40,"tag":3549,"props":3550,"children":3551},"style",{},[3552],{"type":45,"value":3553},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3555,"total":3739},[3556,3577,3594,3613,3626,3642,3655,3670,3687,3702,3715,3727],{"slug":3557,"name":3557,"fn":3558,"description":3559,"org":3560,"tags":3561,"stars":3574,"repoUrl":3575,"updatedAt":3576},"faro-setup-web","instrument web apps with Grafana Faro","Instruments a web app with Grafana Faro Web SDK for frontend observability. Use when setting up error tracking, Web Vitals, session monitoring, or distributed tracing in a browser app.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3562,3565,3568,3571],{"name":3563,"slug":3564,"type":15},"Distributed Tracing","distributed-tracing",{"name":3566,"slug":3567,"type":15},"Frontend","frontend",{"name":3569,"slug":3570,"type":15},"Monitoring","monitoring",{"name":3572,"slug":3573,"type":15},"Observability","observability",1103,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Ffaro-web-sdk","2026-07-12T07:43:24.63314",{"slug":3578,"name":3578,"fn":3579,"description":3580,"org":3581,"tags":3582,"stars":3591,"repoUrl":3592,"updatedAt":3593},"configuring-yesoreyeram-infinity-datasource","configure Grafana Infinity data source","Configure the Infinity data source — base URL and allowed hosts, the authentication methods (basic, bearer token, API key, digest, OAuth passthrough, OAuth 2.0 client credentials\u002FJWT, Azure, Azure Blob, AWS), TLS, custom HTTP headers, network and security settings, the custom health check, and provisioning with a config file. Use when a user asks how to set up, configure, or change settings for the Infinity data source; how to authenticate to an API; how to allow hosts; how to provision it as YAML; or how to troubleshoot connection, authentication, or health-check issues.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3583,3586,3589,3590],{"name":3584,"slug":3585,"type":15},"API Development","api-development",{"name":3587,"slug":3588,"type":15},"Authentication","authentication",{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},1056,"https:\u002F\u002Fgithub.com\u002Fgrafana\u002Fgrafana-infinity-datasource","2026-07-12T07:43:25.939136",{"slug":3595,"name":3595,"fn":3596,"description":3597,"org":3598,"tags":3599,"stars":3591,"repoUrl":3592,"updatedAt":3612},"querying-yesoreyeram-infinity-datasource","query data with Infinity datasource","Build queries with the Infinity data source — the query types (JSON, CSV, TSV, XML, GraphQL, HTML, UQL, GROQ, Google Sheets, Series, Transformations), the parsers (Frontend\u002Fsimple, Backend JSONata, JQ, UQL, GROQ) and which support alerting, the sources (URL, Inline, Reference, Azure Blob, Random walk), output formats (table, timeseries, logs, trace, node graph, dataframe), root selector and columns, computed columns\u002Ffilters\u002Fsummarize, pagination, and template variables. Use when a user asks how to query Infinity; how to fetch JSON\u002FCSV\u002FXML\u002FGraphQL\u002FHTML from a URL or inline; how to select rows and columns; how to transform data with UQL\u002FGROQ\u002FJSONata\u002FJQ; how to make a query work with alerting; how to paginate; or how to use variables in a query.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3600,3603,3606,3607,3610],{"name":3601,"slug":3602,"type":15},"CSV","csv",{"name":3604,"slug":3605,"type":15},"Data Analysis","data-analysis",{"name":9,"slug":8,"type":15},{"name":3608,"slug":3609,"type":15},"GraphQL","graphql",{"name":3611,"slug":2022,"type":15},"JSON","2026-07-15T05:34:05.773947",{"slug":3614,"name":3614,"fn":3615,"description":3616,"org":3617,"tags":3618,"stars":23,"repoUrl":24,"updatedAt":3625},"agento11y","manage Grafana Agent Observability resources","Inspects and manages Grafana Agent Observability resources via gcx: conversations, generations, evaluators, rules, scores, and templates. Use when the user wants to list or search conversations, inspect generations, manage evaluators (upsert, test, delete), set up evaluation rules, check scores, or browse evaluator templates. Trigger on phrases like \"list conversations\", \"search generations\", \"what did the agent do\", \"debug LLM conversation\", \"create evaluator\", \"set up evaluation rule\", \"test evaluator\", \"check scores\", \"evaluate generation quality\", or \"set up online evaluation\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3619,3622,3623,3624],{"name":3620,"slug":3621,"type":15},"Agents","agents",{"name":9,"slug":8,"type":15},{"name":3569,"slug":3570,"type":15},{"name":3572,"slug":3573,"type":15},"2026-07-25T05:30:40.29622",{"slug":3627,"name":3627,"fn":3628,"description":3629,"org":3630,"tags":3631,"stars":23,"repoUrl":24,"updatedAt":3641},"agento11y-instrument","instrument LLM apps for agent observability","Sets up and instruments a developer's own LLM app or agent to send generations and agentic workflow to Grafana Agent Observability (the Agent Observability SDKs) — greenfield setup, fixing broken instrumentation, or filling gaps in existing instrumentation. Uses gcx for the parts a static prompt can't do: `gcx login` \u002F `gcx cloud stacks` to find the stack, and `gcx agento11y agents|conversations|generations` to VERIFY that data actually lands — so it iterates (instrument → run → verify → fix) until generations arrive, not blindly. Reads the app's code, detects language\u002Fframework, classifies instrumentation state (none \u002F partial \u002F broken), then runs a fixed gap checklist whose #1 item is the silent failure no other prompt catches: the SDK emits OTel spans\u002Fmetrics but never creates a TracerProvider\u002FMeterProvider, so without them all metrics go to a no-op and are lost. Also checks agent_version (required for per-version Performance charts), set_result completeness, SYNC vs STREAM, parent_generation_ids DAG links, and workflow-step coverage. Recommends changes citing file:line and, only with explicit confirmation, applies minimal diffs that don't change app behavior. Pulls SDK reference from agento11y's llms.txt rather than restating it, and hands off to `agento11y-test-starter` once data flows. It does NOT write test suites or set up tenant evaluations, rules, or guards — offline test suites are `agento11y-test-starter`, tenant eval rules + guards are `agento11y-prod-setup`; does NOT install coding-agent telemetry plugins (that is llms.txt \"Path A\"); does NOT mint or store credentials or invent endpoints. Trigger on phrases like \"instrument my app\", \"send my agent's traces to Grafana\", \"set up AI observability for my app\", \"my generations aren't showing up\", \"why is Performance empty\", \"add Agent Observability to my code\", \"fix my instrumentation\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3632,3633,3634,3637,3640],{"name":3620,"slug":3621,"type":15},{"name":9,"slug":8,"type":15},{"name":3635,"slug":3636,"type":15},"Instrumentation","instrumentation",{"name":3638,"slug":3639,"type":15},"LLM","llm",{"name":3572,"slug":3573,"type":15},"2026-07-31T05:53:52.580237",{"slug":3643,"name":3643,"fn":3644,"description":3645,"org":3646,"tags":3647,"stars":23,"repoUrl":24,"updatedAt":3654},"agento11y-prod-setup","setup production evaluation for AI agents","Sets up production evaluation and guardrails for a DEPLOYED AI agent in Grafana Agent Observability, grounded in the agent's own code and its real ingested traffic. The judgment layer on top of the `agento11y` skill: it reads the agent's source (system prompt, tools, entrypoint) AND samples its live traffic via gcx, checks what evaluators\u002Frules\u002Fguards already exist, then recommends only what's missing — online eval rules (score live conversations for regressions) and guards (warn-first request-path policies that redact \u002F tool-filter and may later be promoted to deny). It drafts reviewable YAML and, only with explicit confirmation, applies via `gcx agento11y`. New guards are drafted in warn mode (safe on live traffic — warn records but never blocks). It DOES create stack-level objects — that is the point — but every write is confirmed. It never rewrites or redeploys the agent. Trigger on phrases like \"set up production evaluation\", \"my agent is in prod what should I evaluate\", \"catch quality regressions\", \"add guardrails to my agent\", \"redact PII from my agent\", \"block dangerous tools\", \"set up online evals and guards\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3648,3649,3652,3653],{"name":3620,"slug":3621,"type":15},{"name":3650,"slug":3651,"type":15},"Evals","evals",{"name":9,"slug":8,"type":15},{"name":3572,"slug":3573,"type":15},"2026-07-31T05:53:53.576347",{"slug":3656,"name":3656,"fn":3657,"description":3658,"org":3659,"tags":3660,"stars":23,"repoUrl":24,"updatedAt":3669},"agento11y-test-starter","build and run agent test suites","Use early in an AI-agent project — before ship, before real traffic — to build a starter test suite for the agent and run it offline. Reads the agent's own code (system prompt, tools, task), writes a labeled draft suite of test cases (happy\u002Fedge\u002Fadversarial) grounded in real lines, and recommends how to score each case (the evaluators\u002Fjudges the offline runner uses). Assesses how runnable the agent is: for an easily-invoked agent it generates a runner stub (run_experiment.py) with two holes to fill and can optionally run it (only with permission, only against the endpoint the developer configured); for agents needing a harness or full runtime it points to the existing eval infra. It runs OFFLINE and never creates tenant-level evaluators, rules, or guards — that is `agento11y-prod-setup`, for a deployed agent with real traffic. Trigger on phrases like \"how do I test my agent before shipping\", \"write test cases for my agent\", \"set up tests for my agent\", \"check my agent before prod\", \"I have no traffic yet, how do I evaluate it\", \"test my agent offline\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3661,3662,3663,3666],{"name":3620,"slug":3621,"type":15},{"name":9,"slug":8,"type":15},{"name":3664,"slug":3665,"type":15},"QA","qa",{"name":3667,"slug":3668,"type":15},"Testing","testing","2026-07-31T05:53:51.62785",{"slug":3671,"name":3671,"fn":3672,"description":3673,"org":3674,"tags":3675,"stars":23,"repoUrl":24,"updatedAt":3686},"create-dashboard","create Grafana dashboards with gcx","Designs and creates Grafana dashboards with gcx, using `gcx dashboards snapshot` as a visual feedback loop. Use when the user wants to create a new Grafana dashboard, add panels, variables, or annotations to an existing dashboard, design dashboard panels, variables, queries, or layout, or make a material visual redesign. Triggers on \"create dashboard\", \"new dashboard\", \"build dashboard\", \"dashboard for \u003Cservice>\", \"add panels\", \"add variable\", \"add annotation\", \"improve this dashboard\", or \"iterate on a dashboard\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3676,3679,3682,3685],{"name":3677,"slug":3678,"type":15},"Dashboards","dashboards",{"name":3680,"slug":3681,"type":15},"Data Visualization","data-visualization",{"name":3683,"slug":3684,"type":15},"Design","design",{"name":9,"slug":8,"type":15},"2026-07-25T05:30:46.289717",{"slug":3688,"name":3688,"fn":3689,"description":3690,"org":3691,"tags":3692,"stars":23,"repoUrl":24,"updatedAt":3701},"debug-with-grafana","investigate application issues with Grafana","Structured workflow for investigating application problems with Grafana observability data (metrics, logs, traces) via gcx. Covers live firefighting AND retrospective incident analysis: incident triage, root-cause analysis, blast-radius checks (did an incident spill into other services), verifying whether a deployment or rollout triggered an incident, finding which service, endpoint, or path owns the most errors or slow requests, checking whether retries or queue backlogs piled up, and quantifying error or latency shares over a time window. Trigger on: \"my API is returning 500 errors\", \"latency is spiking\", \"investigate why requests are failing\", \"triage the incident\", \"blast radius\", \"root cause\", \"did the rollout cause it\", \"which endpoint owns the most 5xx\", \"did retries pile up\", or any request to analyse an earlier incident window using telemetry. For authoring dashboards use create-dashboard; for dashboard inventory use manage-dashboards.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3693,3696,3697,3700],{"name":3694,"slug":3695,"type":15},"Debugging","debugging",{"name":9,"slug":8,"type":15},{"name":3698,"slug":3699,"type":15},"Incident Response","incident-response",{"name":3572,"slug":3573,"type":15},"2026-07-18T05:11:10.445428",{"slug":3703,"name":3703,"fn":3704,"description":3705,"org":3706,"tags":3707,"stars":23,"repoUrl":24,"updatedAt":3714},"diagnose-entity-graph","diagnose Grafana Entity Graph issues","Diagnose Entity Graph problems: missing entities, missing edges, disconnected clusters, or filtering issues. Use when the user reports that Entity Graph doesn't look right, services are missing, edges aren't appearing, or environments can't be filtered. Triggers for: \"entity graph is empty\", \"services missing from entity graph\", \"no edges in entity graph\", \"disconnected services\", \"can't filter entity graph\", \"entity graph not working\", \"diagnose entity graph\", \"debug knowledge graph\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3708,3709,3710,3713],{"name":3694,"slug":3695,"type":15},{"name":9,"slug":8,"type":15},{"name":3711,"slug":3712,"type":15},"Graph Analysis","graph-analysis",{"name":3572,"slug":3573,"type":15},"2026-07-25T05:30:39.380934",{"slug":105,"name":105,"fn":3716,"description":3717,"org":3718,"tags":3719,"stars":23,"repoUrl":24,"updatedAt":3726},"manage Grafana Cloud resources via gcx","Manages Grafana Cloud resources via the gcx CLI. Trigger when the user wants to inspect, create, update, delete, query, or automate any Grafana resource - dashboards, datasources, alerts, SLOs, synthetic checks, oncall, incidents, fleet, k6, knowledge graph, or adaptive telemetry.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3720,3721,3722,3723],{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":3569,"slug":3570,"type":15},{"name":3724,"slug":3725,"type":15},"Operations","operations","2026-07-31T05:53:50.587304",{"slug":3728,"name":3728,"fn":3729,"description":3730,"org":3731,"tags":3732,"stars":23,"repoUrl":24,"updatedAt":3738},"gcx-demo","present gcx demo tours","Run a narrated, read-only demo tour of gcx for customer or colleague presentations. Showcases the breadth of gcx across every Grafana Cloud product area — resources, datasources, metrics, logs, traces, SLOs, alerts, synthetic monitoring, IRM, k6, fleet, and more. All commands are strictly read-only. Trigger when the user says \"demo gcx\", \"show off gcx\", \"customer demo\", \"gcx tour\", or \"\u002Fgcx-demo\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3733,3734,3735],{"name":17,"slug":18,"type":15},{"name":9,"slug":8,"type":15},{"name":3736,"slug":3737,"type":15},"Presentations","presentations","2026-07-25T05:30:45.282458",80,{"items":3741,"total":3792},[3742,3749,3757,3764,3771,3778,3785],{"slug":3614,"name":3614,"fn":3615,"description":3616,"org":3743,"tags":3744,"stars":23,"repoUrl":24,"updatedAt":3625},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3745,3746,3747,3748],{"name":3620,"slug":3621,"type":15},{"name":9,"slug":8,"type":15},{"name":3569,"slug":3570,"type":15},{"name":3572,"slug":3573,"type":15},{"slug":3627,"name":3627,"fn":3628,"description":3629,"org":3750,"tags":3751,"stars":23,"repoUrl":24,"updatedAt":3641},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3752,3753,3754,3755,3756],{"name":3620,"slug":3621,"type":15},{"name":9,"slug":8,"type":15},{"name":3635,"slug":3636,"type":15},{"name":3638,"slug":3639,"type":15},{"name":3572,"slug":3573,"type":15},{"slug":3643,"name":3643,"fn":3644,"description":3645,"org":3758,"tags":3759,"stars":23,"repoUrl":24,"updatedAt":3654},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3760,3761,3762,3763],{"name":3620,"slug":3621,"type":15},{"name":3650,"slug":3651,"type":15},{"name":9,"slug":8,"type":15},{"name":3572,"slug":3573,"type":15},{"slug":3656,"name":3656,"fn":3657,"description":3658,"org":3765,"tags":3766,"stars":23,"repoUrl":24,"updatedAt":3669},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3767,3768,3769,3770],{"name":3620,"slug":3621,"type":15},{"name":9,"slug":8,"type":15},{"name":3664,"slug":3665,"type":15},{"name":3667,"slug":3668,"type":15},{"slug":3671,"name":3671,"fn":3672,"description":3673,"org":3772,"tags":3773,"stars":23,"repoUrl":24,"updatedAt":3686},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3774,3775,3776,3777],{"name":3677,"slug":3678,"type":15},{"name":3680,"slug":3681,"type":15},{"name":3683,"slug":3684,"type":15},{"name":9,"slug":8,"type":15},{"slug":3688,"name":3688,"fn":3689,"description":3690,"org":3779,"tags":3780,"stars":23,"repoUrl":24,"updatedAt":3701},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3781,3782,3783,3784],{"name":3694,"slug":3695,"type":15},{"name":9,"slug":8,"type":15},{"name":3698,"slug":3699,"type":15},{"name":3572,"slug":3573,"type":15},{"slug":3703,"name":3703,"fn":3704,"description":3705,"org":3786,"tags":3787,"stars":23,"repoUrl":24,"updatedAt":3714},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3788,3789,3790,3791],{"name":3694,"slug":3695,"type":15},{"name":9,"slug":8,"type":15},{"name":3711,"slug":3712,"type":15},{"name":3572,"slug":3573,"type":15},24]