Skills2026年3月29日·1 分钟阅读

Gemini CLI Extension: Observability — Monitoring & Logs

Gemini CLI extension for Google Cloud observability. Set up monitoring, analyze logs, create dashboards, and configure alerts.

Agent 就绪

这个资产会安全暂存

这个资产会先安全暂存。复制的指令会要求 Agent 读取暂存文件,并在激活脚本、MCP 配置或全局配置前先确认。

Stage only · 17/100策略:需暂存
Agent 入口
任意 MCP/CLI Agent
类型
CLI Tool
安装
Stage only
信任
信任等级:Community
入口
Gemini CLI Extension: Observability
安全暂存命令
npx -y tokrepo@latest install aa41279c-0695-4fd6-a8ec-f70e0f255cff --target codex

先暂存文件;激活前需要读取暂存 README 和安装计划。

TL;DR
Gemini CLI extension for setting up monitoring, analyzing logs, creating dashboards, and configuring alerts.
§01

What it is

The Gemini CLI Observability extension is an official Google extension that adds application monitoring and observability capabilities to the Gemini command-line interface. It assists with setting up monitoring for Google Cloud services, analyzing logs, creating dashboards, and configuring alerts.

It targets DevOps engineers, SREs, and platform teams who manage Google Cloud infrastructure and want AI assistance for complex observability tasks like writing MQL queries, setting up SLOs, or debugging production incidents.

§02

How it saves time or tokens

Observability configuration involves verbose YAML, complex query languages (MQL, LogQL), and deep knowledge of metric naming conventions. This extension generates monitoring configurations, log queries, and dashboard definitions from natural language descriptions. Instead of reading documentation for the exact MQL syntax, you describe what you want to monitor and the extension produces the query. Estimated token usage is around 500 tokens per interaction.

§03

How to use

  1. Install the extension:
gemini extensions install observability
  1. Analyze application logs:
gemini 'Show me error logs from the payment service in the last 24 hours'
  1. Create a monitoring dashboard:
gemini 'Create a Cloud Monitoring dashboard for my GKE cluster showing CPU, memory, and pod restart metrics'
§04

Example

Generated MQL query for latency monitoring:

fetch gae_app
| metric 'appengine.googleapis.com/http/server/response_latencies'
| filter resource.module_id = 'default'
| align delta(1m)
| every 1m
| group_by [metric.response_code],
    [latency_p99: percentile(value.response_latencies, 99)]
§05

Related on TokRepo

§06

Common pitfalls

  • Generated queries assume Google Cloud Monitoring (Stackdriver). They do not translate directly to Prometheus, Grafana, or Datadog query languages.
  • Alert policies generated by the extension should be tested in staging before production. Incorrect thresholds can cause alert storms or missed incidents.
  • The extension requires appropriate IAM permissions to access logs and metrics. Ensure the authenticated user has monitoring.viewer and logging.viewer roles.

常见问题

Does this extension work with non-Google Cloud platforms?+

No. The observability extension is specific to Google Cloud Monitoring, Logging, and related services. For other platforms, use their native CLI tools or dedicated integrations.

Can it create SLO definitions?+

Yes. Describe your service-level objectives in natural language, and the extension generates SLO configurations for Cloud Monitoring including availability and latency targets.

What log analysis capabilities does it offer?+

The extension can write Cloud Logging queries, summarize log patterns, identify error spikes, and correlate log entries across services. It understands structured logging fields and label filtering.

Does it support custom metrics?+

Yes. The extension can generate code for creating and writing custom metrics, as well as queries for monitoring them. Describe your metric in natural language and it produces the monitoring configuration.

How is this different from using Gemini directly?+

The extension has specialized context about Google Cloud Monitoring APIs, MQL syntax, and observability best practices. It produces more accurate and actionable monitoring configurations than a generic LLM prompt.

引用来源 (3)
🙏

来源与感谢

Created by Google. Licensed under Apache 2.0. gemini-cli-extensions/observability Part of Gemini CLI — ⭐ 99,400+

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产