TL;DR

Grafana Labs vừa ra mắt GCX (Grafana Cloud CLI) tại GrafanaCON 2026 (Barcelona, 20–22/04/2026) — public preview, Apache 2.0, viết bằng Go (97.3%), version v0.2.8. Đây không phải một CLI thường — GCX tự phát hiện agent mode, ship kèm Agent Skills bundle tương thích Claude Code, Cursor, GitHub Copilot, OpenAI Codex, OpenCode, Pi. Nó thay thế grafanactl và hợp nhất 16+ sản phẩm Grafana Cloud (SLO, Synthetic Monitoring, k6, IRM, Adaptive Telemetry, Sigil…) vào một binary duy nhất. Yêu cầu Grafana 12+.

GCX — Grafana Cloud CLI help output

What's new

Câu tagline của GCX nói thẳng: "Don't guess. Check the actual production data." Grafana đóng gói toàn bộ surface area của Grafana Cloud + Grafana Assistant vào terminal và coding agent của bạn:

  • Agent mode auto-detect — nhận ra Claude Code, Cursor, Copilot, Codex, Amazon Q… qua env var (CLAUDECODE, CURSOR_AGENT, GITHUB_COPILOT, v.v.) và tự bật JSON output + agent-friendly formatting.
  • Agent Skills bundle — cài vào ~/.agents/skills, gồm skills cho dashboard GitOps, alert investigation, structured debugging, SLO management, Synthetic Monitoring, project scaffolding, end-to-end observability rollout. Có plugin riêng cho Claude Code.
  • Unified resource management — một CLI quản lý cả Grafana-native (dashboards, folders, alert rules, datasources) lẫn Grafana Cloud products.
  • GitOps & Observability-as-Codegcx push idempotent, folders được push trước dashboards để thỏa dependencies. Scaffold Go project qua grafana-foundation-sdk, lint với Rego policies, live-reload với gcx dev serve.

Why it matters

Adoption của Claude Code, Cursor và Copilot đã bùng nổ, nhưng các agent này có một điểm mù nghiêm trọng: chúng thấy code, nhưng mù production. Không thấy latency spike, không thấy server load, không biết SLO có đang cháy hay không. Chúng viết code dựa trên điều có thể xảy ra, không phải điều đang thực sự diễn ra.

GCX được sinh ra để đóng lại khoảng trống đó. Grafana Assistant cung cấp trí thông minh; GCX cung cấp cái interface.

Thay vì developer phải chuyển tab liên tục giữa IDE và Grafana dashboard, agent gọi thẳng Grafana Assistant qua GCX từ trong editor — tạo ra một continuous feedback cycle giữa code và production.

Technical facts

Các con số và chi tiết kỹ thuật đáng ghim:

Thuộc tínhGiá trị
LicenseApache 2.0
Ngôn ngữGo 97.3% · Rego 1.5% · Shell 0.7%
Phiên bản hiện tạiv0.2.8 (public preview)
Yêu cầu Grafana12.x trở lên (Cloud / OSS / Enterprise)
OS hỗ trợLinux, macOS, Windows
Cài đặtQuick install script, pre-built binary, go install. Homebrew COMING SOON.
AuthOAuth browser (experimental), Service Account token, Cloud Access Policy token, env vars

Command surface bao phủ gần như toàn bộ Grafana Cloud: gcx slo, gcx synth, gcx irm, gcx alert, gcx k6, gcx fleet, gcx kg, gcx frontend, gcx appo11y, gcx sigil (AI observability mới), gcx assistant, gcx metrics adaptive, gcx logs adaptive, gcx traces adaptive, gcx profiles (Pyroscope), gcx traces (Tempo). Query trực tiếp: gcx query prometheus, gcx query loki. Raw API: gcx api get.

GCX visualize Prometheus metrics trực tiếp trong terminal

CI/CD ready: mọi command (trừ edit) đều non-interactive, có --dry-run, --on-error abort|fail|ignore, -o json/-o yaml, structured errors và exit codes deterministic. Binary macOS chưa được Apple notarize — Gatekeeper có thể block với lỗi "Apple could not verify…" hoặc killed: 9; script quick install xử lý quarantine tự động.

Comparison

So với grafanactl (tool cũ), GCX là bước tiến hoá trực tiếp — migrate chỉ cần search-and-replace grafanactlgcx (chỉ cần đổi grafanactl resources serve thành gcx dev serve). Điểm khác biệt cốt lõi:

Khía cạnhgrafanactlGCX
ScopeChủ yếu Grafana OSS resourcesOSS + toàn bộ Cloud products
Agent awarenessKhôngAuto-detect + Agent Skills bundle
Grafana AssistantKhông tích hợpGọi trực tiếp từ terminal
UXFragmented theo sản phẩmMột binary, subcommand thống nhất

Use cases

Workflow agentic chuẩn mà Grafana mô tả trong repo:

  1. Alert fires — P95 latency trên service checkout vượt SLO threshold.
  2. Assistant investigates — Coding agent gọi Grafana Assistant qua GCX; Assistant trace ra nguyên nhân là missing index trên cột customer_id gây full table scan khi tải cao.
  3. Fix — Agent draft migration, thêm index.
  4. Prevent recurrence — Instrument service với OpenTelemetry spans, tạo Synthetic Monitoring check trên checkout flow, dựng alert rule trên query duration.
  5. Ship — Mở PR, test pass, deploy. Alert resolve.

Toàn bộ pipeline investigation → fix → instrumentation → monitoring xảy ra mà dev không rời editor. Ngoài agent workflow, GCX còn phục vụ GitOps cho dashboard-as-code, quản lý SLO từ terminal, chạy CI/CD pipeline với JSON output machine-parseable.

Limitations & pricing

  • Public preview — dev tích cực. Không SLA. Bug xử lý bởi Engineering, không có on-call support.
  • Grafana 12+ only — version cũ không được hỗ trợ.
  • macOS Gatekeeper friction — binary chưa notarize, cần quick install script hoặc tay xóa quarantine + ad-hoc sign.
  • Homebrew chưa có — đang coming soon.
  • Giá: CLI miễn phí (Apache 2.0). Ghép với Grafana Cloud free tier (10k Prometheus metrics, 50GB logs, 50GB traces, Grafana Assistant) hoặc Grafana OSS/Enterprise self-host.

What's next

GCX là một phần của gói announcement lớn tại GrafanaCON 2026, chứng minh Grafana đang đặt cược mạnh vào hướng AI observability:

  • Sigil — AI observability tool mới, treat LLM conversations và agent sessions như telemetry signals, phát hiện data exposure và policy violation sớm hơn các công cụ truyền thống.
  • Loki Evolution — rebuild trên Apache Kafka, query planner mới nhanh 10× trên aggregated queries và quét ít hơn 20× dữ liệu.
  • Grafana Assistant on-prem — giờ đã có trong Grafana Enterprise, kèm Assistant Workspace và Assistant API.
  • o11y-bench — benchmark open-source kiểu IQ test cho AI observability agent trên live Grafana stack.
  • Grafana 13 — tập trung scale, flexible dashboards, insight nhanh hơn.
  • Dedicated AI organization — dẫn dắt bởi Mat Ryer, tân Director of AI.

Hướng đi rõ: nếu agent sắp vận hành enterprise ở quy mô lớn, chúng cần một observability supervisor. Grafana đang claim chỗ đó trước khi bất kỳ ai khác nhảy vào. Xem repo tại github.com/grafana/gcx hoặc docs tại grafana.com/docs.

Nguồn: grafana/gcx README, Grafana Docs, SiliconANGLE.