SkillsMar 29, 2026·1 min read

Gemini CLI Extension: Observability — Monitoring & Logs

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

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.

Frequently Asked Questions

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.

Citations (3)
🙏

Source & Thanks

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

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets