Generated banner for Cloud Monitoring Alert Configuration
Generated logo for Cloud Monitoring Alert Configuration

Cloud Monitoring Alert Configuration

GoogleOfficialPublished by Google

  • Skill
  • Workflow
  • Cloud and DevOps
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Configures Cloud Monitoring alerting policies using Terraform and PromQL across Cloud Run, Google Kubernetes Engine (GKE), Compute Engine, AI Hypercomputer reservations, Vertex AI Agent Engine, and generic Google Cloud resources. Use when creating, reviewing, migrating, or deduplicating Terraform alerting policies for latency, traffic, error rates, saturation, host or reservation maintenance, GPU XID insights, or AI agent telemetry. Don't use for standalone PromQL query authoring without alerting, log querying, or billing cost audits.
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured workflow for defining, reviewing, and managing Cloud Monitoring alerting policies. It leverages Terraform for infrastructure-as-code and PromQL for metric conditions, ensuring consistent observability across Google Cloud resources including Cloud Run, GKE, Compute Engine, and AI Agent platforms. The skill enforces best practices like the Four Golden Signals, dynamic grouping, and proper labeling, while providing clear paths for delegating SLO-specific configurations and notification channel management.

What it does

  • Generates parameterized Terraform configurations for Cloud Monitoring alert policies.
  • Implements PromQL-based conditions for high-signal monitoring.
  • Provides resource-specific guidance for GKE, Cloud Run, Compute Engine, and AI agents.
  • Enforces standardized labeling for all generated alerting resources.
  • Integrates with specialized scripts to analyze traffic patterns for AI agent telemetry.
  • Delegates SLO and notification channel configuration to dedicated skills.

When to use it

  • When creating or migrating Terraform-based alerting policies for Google Cloud infrastructure.
  • When setting up monitoring for AI agent reliability, quality, and cost telemetry.
  • When deduplicating existing alert policies to improve signal-to-noise ratios.
  • When configuring alerts for latency, traffic, error rates, or saturation across cloud services.

Advantages

  • Ensures consistent observability standards across diverse cloud environments.
  • Reduces manual configuration errors through structured Terraform templates.
  • Promotes best practices like dynamic grouping and the Four Golden Signals.
  • Maintains clear separation of concerns by delegating SLO and notification tasks.
  • Provides data-driven traffic analysis for accurate AI agent alert thresholds.

Usage examples

“Create a Terraform alerting policy for high latency on my GKE service.”
The agent will guide you through selecting the appropriate GKE PromQL queries, generate the google_monitoring_alert_policy Terraform resource, and prompt you to attach notification channels.
“Configure a cost alert for my Vertex AI Agent based on token usage.”
The agent will run the traffic analysis script to determine your workload pattern and generate a PromQL-based alert policy tailored to your agent's historical token consumption.

Install

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/google/cloud-monitoring-alert-configuration/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip cloud-monitoring-alert-configuration.zip -d .agents/skills

Documentation by Google

Configure Cloud Monitoring Alerts

Configure high-signal alerting policies in Cloud Monitoring using Terraform (google_monitoring_alert_policy) and PromQL (condition_prometheus_query_language).

Usage Attribution

For all gcloud CLI, REST API, and MCP attribution requirements when executing commands with this skill, follow the instructions in Usage Attribution.

Enforce Core Alerting Rules

  1. Apply the Four Golden Signals: Cover latency, traffic, errors, and saturation for the target workload.

  2. Use Dynamic Grouping: Aggregate metrics by resource labels and parameterize thresholds with Terraform variables. Never hardcode ephemeral pod or instance identifiers.

  3. Default to PromQL: Use Prometheus Query Language (PromQL) for metric conditions, and use log-based alerts (condition_matched_log or google_logging_metric) for lifecycle and audit events.

  4. Attach Skill Attribution Labels: Always include user_labels with created-with-google-skill = "cloud-monitoring-alert-configuration" on every generated google_monitoring_alert_policy resource.

  5. Require User Confirmation Before Mutating Resources: Never execute commands that modify infrastructure, enable telemetry, create online monitors, or apply Terraform without waiting for explicit user confirmation.

  6. Prompt for Notification Channels: Alerting policies without notification channels incur charges without notifying anyone during an incident. Whenever notification channels are not specified in the user prompt across any workflow, explicitly inform the user that no notification channels are attached to the alerting policies, advise them to configure and attach notification channels before deploying, and ask at the end of your response if they want to configure notification channels.

Route by Target Resource Type

Identify the target resource type and read only the matching reference file directly. Never run directory listings or workspace file searches to look for queries or .tf files unless the prompt explicitly provides a file path. If a user asks to fix or validate a PromQL query without providing the query text or a file path, construct a representative broken-and-corrected query example directly.

Configure Cloud Run Alerts
Configure Google Kubernetes Engine Alerts
Configure AI Agent Alerts
Configure Compute Engine and AI Hypercomputer Alerts
  • Compute Engine VMs, MIGs, GPU XID Insights, Host or Reservation Maintenance (type=scheduled, unscheduled, or multiple), and Machine or Domain Health: compute_engine_alerts.md

Configure Generic Resource Alerts
Delegate Service Level Objective Alerts

Delegate to the google-cloud-slo-alert-configuration skill. That skill owns the SLO setup wizard, the burn-rate PromQL templates (references/promql_templates.md), the SLI metric mapping (references/service_metrics.md), and the App Hub scoping labels (references/app_hub_labels.md). Do NOT duplicate those templates here or claim that this skill owns its own SLO PromQL template library.

Delegate whenever the user asks for an availability or latency SLO, an error budget or burn-rate alert, or a Service Level Objective on any resource. When SLOs are only one part of a broader request (for example, a full production alerting suite for a Cloud Run service), delegate the SLO policies and continue generating the remaining golden-signal policies from the resource-specific reference in the same response.

Every resource reference carries a Context to hand off list naming the SLI metric, its good or bad filter, and the grouping labels — under a ## Delegate Service Level Objective Alerts heading for Cloud Run and generic resources, and inside the SLO section itself for GKE and Agent Platform. Read it and pass that context on, so the SLO skill does not repeat discovery you have already done. When delegating, you MUST also:

  1. State the SLO target and window explicitly if the user gave them, or let the SLO skill apply its SRE defaults (99.9% over a rolling 28 days) if they did not.

  2. Require the returned policies to carry user_labels with created-with-google-skill = "cloud-monitoring-alert-configuration" so attribution stays consistent with the rest of the generated suite. This literal value does NOT change when you delegate: the label records the entry-point skill, not whichever skill supplied the template. Do NOT set created-with-google-skill = "google-cloud-slo-alert-configuration" on policies generated through this delegation.

  3. Preserve the burn-rate duration contract, which google-cloud-slo-alert-configuration does not specify: Fast Burn (1h and 5m windows, factor 14.4) carries duration = "300s", and Slow Burn ([3d] and [6h] lookback, factor 1.0) omits the duration field entirely — do not emit duration = "0s" in its place. Cloud Monitoring rejects a non-zero retest buffer when the lookback window exceeds 25 hours.

  4. When no notification channels are provided, inform the user that no notification channels are attached to the alerting policies, advise them to configure and attach notification channels, and ask if they want to configure notification channels.

[!IMPORTANT] Always tell the user about the referral, even on the fallback path. Some reference files in this skill include standalone burn-rate templates to use when the google-cloud-slo-alert-configuration skill is not installed. If you emit policies from those fallback templates, your response MUST still tell the user that google-cloud-slo-alert-configuration owns SLO configuration, state that the emitted policies use the local fallback templates, and list the handoff context. Never silently present SLO policies as if this skill owned them.

[!NOTE] Exception: Agent Platform (OpenTelemetry-instrumented AI agents on any runtime, including Vertex AI Agent Engine and Cloud Run) is the one resource whose Fast and Slow burn policies live in this skill and remain authoritative. Delegate only for SLO customization — see Reliability.

  • Notification Channels: Delegate to cloud-monitoring-notification-channels-configuration to configure email, PagerDuty, Pub/Sub, or Slack channels. When an alerting policy has no notification channels attached, inform the user that no notification channels are attached and that they should configure notification channels and attach them to the alerting policy.

  • PromQL Authoring: Delegate to cloud-monitoring-promql-query for standalone PromQL query authoring or metric exploration.

Follow the Alert Configuration Workflow

  1. Discover: Identify target resources, metric schemas, and scoping projects using the lookup commands in the matching reference file (such as discover_metric_schema.py for Compute Engine metrics and other Google Cloud resource metrics, or gather_agent_info.py, check_telemetry.py, analyze_traffic.py, create_online_monitor.py, list_trace_scope_table_names.py, and list_log_scope_table_names.py for AI agents).

  2. Route: Load the reference file for the target resource type or delegate SLOs to google-cloud-slo-alert-configuration.

  3. Generate: Produce parameterized Terraform HCL configurations with required user_labels.

  4. Validate: When the loaded reference file requires a validation script (such as lint_promql.py, validate_config.py, lint_syntax.py, or scan_duplicates.py), run or print that exact script command. Do not list or search the scripts/ directory.

  5. Explain and Prompt: Explain each alert policy in plain English. When no notification channels are provided, tell the user that no notification channels are attached to the alerting policy, advise them to configure and attach notification channels, and ask if they want to configure notification channels.

Files

references/generic_alert_policies.md

Configure Generic Alert Policies for Other Resources

This reference provides best-practice alerting patterns for arbitrary Google Cloud resources, custom workloads, or service types that do not have dedicated resource-specific alert references in this skill (such as Cloud Run or GKE).

To maintain consistency across all alerting policies in this skill, we prioritize PromQL (condition_prometheus_query_language) where supported by Cloud Monitoring (through managed Prometheus or Cloud Monitoring PromQL evaluation). Note that Monitoring Query Language (MQL) is deprecated in favor of PromQL — whenever a user requests an MQL alert policy, explicitly inform them that MQL is deprecated in favor of PromQL and provide the equivalent PromQL configuration.

Follow Mandatory Requirements for Generic Resource Alerts

When configuring alerts for any generic, custom, or fallback Google Cloud resource (such as Cloud SQL, Spanner, Memorystore Redis, Pub/Sub, custom processing pipelines, MQL migration, or adding alerts to monitoring/alerts.tf / HCL review and deduplication), follow the patterns in this reference directly. Do not search the workspace for additional reference files, scripts, or unrelated .tf files. Only inspect an existing .tf file (such as monitoring/alerts.tf) when the user asks to add to, review, or deduplicate that file. Run python3 scripts/discover_metric_schema.py --project <project_id> --resource-type <resource_type> to verify exact PromQL metric names (including _bucket), units (for example, us versus ms), resource grouping labels, and documented label enum values before writing HCL. When responding to these requests, you MUST:

  1. Run schema & metric discovery commands: Run python3 scripts/discover_metric_schema.py and gcloud monitoring metric-descriptors list when configuring alerts for custom or unsupported resources, and include the exact commands in your response.

  2. Run PromQL validation commands: Run python3 scripts/lint_promql.py and/or python3 scripts/discover_metric_schema.py --promql (and grep/diff for HCL review) when generating, fixing, validating, or deduplicating HCL/PromQL queries, and include the exact commands in your response.

  3. Perform in-place HCL deduplication: For HCL review or deduplication requests, explicitly describe inspecting existing HCL policies for duplicates and performing an in-place update rather than appending duplicate blocks.

  4. Use explicit grouping: Use sum by (<label>) (for example, sum by (service)) or group_by_fields for fleet-wide aggregation (never ungrouped scalar sum(...)).

  5. Explicitly note MQL deprecation: State that MQL is deprecated in favor of PromQL if MQL is requested.

  6. Prompt for Notification Channels: Always ask the user at the end of your response if they would like to configure notification channels if none were provided.

  7. Delegate SLOs: Whenever an availability, latency, or throughput SLO (or an error-budget / burn-rate alert) is requested, follow Delegate SLOs and Apply the Fallback Rule below: discover the exact SLI metric with scripts/discover_metric_schema.py, then delegate the SLO policy generation to the google-cloud-slo-alert-configuration skill — never emit a single static error ratio as an SLO.


Review the Table of Contents

  1. Discover and Select Metrics: Lines 75-113

  2. Apply the Four Golden Signals Framework (PromQL): Lines 114-159

    • Monitor Error Rate: Lines 116-127

    • Monitor Latency and Duration: Lines 128-137

    • Monitor Traffic and Throughput: Lines 138-147

    • Monitor Saturation and Utilization: Lines 148-159

  3. Apply Terraform Configuration Templates (PromQL): Lines 160-242

    • Use Template A for PromQL-Based Alert Policies (Recommended): Lines 162-197

    • Use Template B for Legacy Threshold-Based Alert Policies (Fallback): Lines 198-242

  4. Configure Cloud Logging Log-Based Metric Alerts: Lines 243-313

  5. Delegate SLOs and Apply the Fallback Rule: Lines 314-378

  6. Validate PromQL Syntax and Metric Schemas: Lines 379-403

  7. Review and Deduplicate HCL Configurations: Lines 404-412

  8. Follow Best Practices and Validation Rules: Lines 413-444


Discover and Select Metrics

Before configuring alerts for an unfamiliar or generic Google Cloud resource, discover its available metrics, metric types, units, and label enum values:

  1. Run Universal Schema & Metric Discovery (discover_metric_schema.py): Run the schema discovery script to automatically inspect monitoredResourceDescriptors and metricDescriptors through the Cloud Monitoring v3 API. This script outputs exact PromQL metric names (including _bucket suffixes for distributions), unit scaling warnings (for example, microseconds us versus milliseconds ms), grouping keys (sum by (...)), and documented label enum values (for example, response_class="success"):

    python3 scripts/discover_metric_schema.py \
        --project="<project_id>" \
        --resource-type="<monitored_resource_type>" \
        --metric-prefix="<metric_prefix_or_domain>"
  2. List Metric Descriptors with the gcloud CLI:

    gcloud monitoring metric-descriptors list \
        --filter="resource.type=\"<monitored_resource_type>\""
  3. Map to PromQL: Cloud Monitoring automatically translates Google Cloud metric types (<domain>/<path>) into Prometheus format by replacing dots (.) with underscores (_), replacing the first slash (/) after the domain with a colon (:), and replacing remaining slashes with underscores (_). For example, serviceruntime.googleapis.com/api/request_count maps to serviceruntime_googleapis_com:api_request_count (append _bucket for distributions). Always verify .unit (us versus ms) and documented label values before writing thresholds or label matchers.


Apply the Four Golden Signals Framework (PromQL)

Monitor Error Rate

Monitor the ratio of failed requests or error status codes over total requests.

  • PromQL Query:

    sum by (service) (rate(serviceruntime_googleapis_com:api_request_count{response_code_class="5xx"}[5m]))
    /
    sum by (service) (rate(serviceruntime_googleapis_com:api_request_count[5m])) > 0.01
Monitor Latency and Duration

Monitor 95th or 99th percentile request duration.

  • PromQL Query:

    histogram_quantile(0.95, sum by (service, le) (rate(serviceruntime_googleapis_com:api_request_latencies_bucket[5m]))) > 2000
Monitor Traffic and Throughput

Monitor total request volume or transaction rate.

  • PromQL Query:

    sum by (service) (rate(serviceruntime_googleapis_com:api_request_count[5m]))
Monitor Saturation and Utilization

Monitor CPU, memory, or resource capacity utilization percentage.

  • PromQL Query:

    avg(rate(container_cpu_usage_seconds_total[5m])) by (instance) > 0.85

Apply Terraform Configuration Templates (PromQL)

This is the standard alerting pattern used across Cloud Run, GKE, and Agent Platform in this skill.

resource "google_monitoring_alert_policy" "generic_promql_error_rate" {
  display_name = "Generic High Error Rate (PromQL)"
  project      = var.project_id
  combiner     = "OR"

  conditions {
    display_name = "Error rate exceeds 1% over 5m"

    condition_prometheus_query_language {
      query    = <<-EOT
        sum by (service) (rate(serviceruntime_googleapis_com:api_request_count{response_code_class="5xx"}[5m]))
        /
        sum by (service) (rate(serviceruntime_googleapis_com:api_request_count[5m])) > 0.01
      EOT
      duration = "300s"
    }
  }

  alert_strategy {
    auto_close = "604800s"
  }

  user_labels = {
    "created-with-google-skill" = "cloud-monitoring-alert-configuration"
    "alert-category"          = "reliability"
    "query-language"          = "promql"
  }
}
Use Template B for Legacy Threshold-Based Alert Policies (Fallback)

Use this only if PromQL is unsupported for the specific metric backend.

resource "google_monitoring_alert_policy" "generic_threshold_error_rate" {
  display_name = "Generic High Error Rate (Threshold)"
  project      = var.project_id
  combiner     = "OR"

  conditions {
    display_name = "Error count exceeds threshold"

    condition_threshold {
      filter          = "metric.type=\"serviceruntime.googleapis.com/api/request_count\" resource.type=\"global\" metric.label.response_code_class=\"5xx\""
      duration        = "300s"
      comparison      = "COMPARISON_GT"
      threshold_value = 10

      aggregations {
        alignment_period     = "60s"
        per_series_aligner   = "ALIGN_RATE"
        cross_series_reducer = "REDUCE_SUM"
        group_by_fields      = ["resource.labels.project_id"]
      }

      trigger {
        count = 1
      }
    }
  }

  alert_strategy {
    auto_close = "604800s"
  }

  user_labels = {
    "created-with-google-skill" = "cloud-monitoring-alert-configuration"
    "alert-category"          = "reliability"
  }
}

Configure Cloud Logging Log-Based Metric Alerts

For applications or services that output text or structured logs rather than native metrics, configure Cloud Logging log-based metrics (google_logging_metric) and alert on them using Cloud Monitoring.

Define a Cloud Logging Log-Based Metric (google_logging_metric)

Extracts a counter or distribution metric from log entries matching a filter (for example, application crashes or unhandled exceptions).

resource "google_logging_metric" "app_error_log_metric" {
  name        = "app-error-log-count"
  project     = var.project_id
  description = "Count of application error log entries"
  filter      = "resource.type=\"global\" severity>=ERROR"

  metric_descriptor {
    metric_kind  = "DELTA"
    value_type   = "INT64"
    unit         = "1"
    display_name = "Application Error Log Count"
  }
}
Create an Alert Policy on a Cloud Logging Log-Based Metric

Create an alert policy tracking the Cloud Logging log-based metric using threshold conditions:

resource "google_monitoring_alert_policy" "log_metric_alert" {
  display_name = "High Application Error Log Rate"
  project      = var.project_id
  combiner     = "OR"

  conditions {
    display_name = "Error log rate exceeds threshold"

    condition_threshold {
      filter          = "metric.type=\"logging.googleapis.com/user/${google_logging_metric.app_error_log_metric.name}\" resource.type=\"global\""
      duration        = "300s"
      comparison      = "COMPARISON_GT"
      threshold_value = 5

      aggregations {
        alignment_period     = "60s"
        per_series_aligner   = "ALIGN_RATE"
        cross_series_reducer = "REDUCE_SUM"
      }

      trigger {
        count = 1
      }
    }
  }

  alert_strategy {
    auto_close = "604800s"
  }

  user_labels = {
    "created-with-google-skill" = "cloud-monitoring-alert-configuration"
    "alert-category"          = "reliability"
  }
}

Delegate SLOs and Apply the Fallback Rule

Availability, latency, and throughput SLOs are owned by the google-cloud-slo-alert-configuration skill. Delegate to it whenever the user asks for an SLO, an error budget, or burn-rate alerting on a generic resource. That skill owns the SLO wizard, the burn-rate templates (references/promql_templates.md), the SLI mapping (references/service_metrics.md), and the App Hub scoping labels (references/app_hub_labels.md).

Never emit a single static threshold or a bare error ratio as an "SLO". Unlike the Cloud Run and GKE references, generic resources have no documented default SLI, so this reference must resolve the SLI first and hand that context over.

Context to hand off (so the SLO skill does not repeat discovery):

  • Resource type: the monitored resource type you confirmed with discovery.

  • Grouping labels: the resource identity labels returned by discovery (the sum by (...) clause).

  • SLI: the discovered metric name, its good/bad filter, and its unit.

  • SLO target: the user's target, or 0.999 (99.9%) if they did not give one.

Discover the Exact SLI Metric and Hand It to the SLO Skill

Generic resources (Cloud SQL, Spanner, Memorystore, Pub/Sub, custom pipelines) rarely have a documented default SLI. Run the schema discovery script and include the exact command in your response:

python3 scripts/discover_metric_schema.py \
    --project="<project_id>" \
    --resource-type="<monitored_resource_type>" \
    --metric-prefix="<metric_prefix_or_domain>"

Use its output to resolve the four things a burn-rate query cannot be written without:

Discovery OutputWhy the SLO Needs It
Exact PromQL metric name{GOOD_METRIC} / {BAD_METRIC} / {TOTAL_METRIC} substitution (for example, serviceruntime_googleapis_com:api_request_count)
_bucket distribution seriesLatency SLIs need the _bucket series for histogram_fraction / histogram_quantile
Unit (us, ms, or s)A 500 ms target is 500 for ms metrics but 500000 for us metrics (us versus ms) — the wrong unit silently produces an alert that never fires
Documented label enum valuesThe failure filter must use real values (for example, response_class="success" or response_code_class="5xx"); an invalid enum yields an always-empty series
Resource grouping labelsThe sum by (...) clause that keeps the burn rate per-service instead of fleet-averaged

Hand the resolved SLI to google-cloud-slo-alert-configuration as the ServiceLevelIndicator input, along with the SLO target and window if the user supplied them.

Fallback — only if google-cloud-slo-alert-configuration is not installed: this reference intentionally carries no burn-rate templates. Say that SLO alerting requires that skill, report the SLI you discovered, and continue with the non-SLO golden-signal policies. Never silently present SLO policies as if this skill owned them.

[!IMPORTANT] Your response MUST say, in plain text, that you will not invent or guess a metric name and that you will ask the user for the custom metric name and failure filter if schema discovery does not resolve one. Say this even when you believe you have identified the right metric — the SLO is only as correct as the SLI it is built on, and a guessed metric silently produces an alert that never fires.

Validate PromQL Syntax and Metric Schemas

When fixing, validating, or generating PromQL alert queries (such as diagnosing and fixing unbalanced parentheses or invalid time windows), never search the workspace or directory tree for a query file if no file path was provided. If the user describes a syntax error (such as unbalanced parentheses) without pasting the query, demonstrate the fix using a concrete before-and-after example (for example, fixing missing closing parenthesis in sum by (service) (rate(serviceruntime_googleapis_com:api_request_count{response_code_class="5xx"}[5m]) > 0.01 to sum by (service) (rate(serviceruntime_googleapis_com:api_request_count{response_code_class="5xx"}[5m])) > 0.01). Always run or print both the static syntax linter (lint_promql.py) and the schema-aware validator (discover_metric_schema.py), and include the exact commands in your response:

# 1. Static PromQL syntax & bracket/window validation
python3 scripts/lint_promql.py "<promql_expression>"

# 2. Live Google Cloud schema, metric existence, unit scaling ('us' versus 'ms'), & label enum validation
python3 scripts/discover_metric_schema.py \
    --project="<project_id>" \
    --promql '<promql_expression>'

Review and Deduplicate HCL Configurations

When adding new alerts to monitoring/alerts.tf, inspect existing HCL policies (for example, using grep or file inspection) to prevent duplicate alert blocks, perform in-place updates when modifying existing policies, and always prompt the user regarding notification channel configuration.


Follow Best Practices and Validation Rules

  1. Prioritize PromQL & Note MQL Deprecation: Always use condition_prometheus_query_language where supported to maintain consistency with Cloud Run, GKE, and Agent Platform alert definitions. If a user requests an MQL policy, explicitly note that MQL is deprecated in favor of PromQL and provide PromQL instead.

  2. Cover Golden Signals (Error Rate + Saturation/Latency): When configuring production alerts for any generic or unsupported resource (such as Cloud SQL, Spanner, Memorystore Redis, or custom workloads), always provide alert policies covering at least Error Rate (or failed operations, evictions, or rejected connections) and Saturation/Latency.

  3. Evaluation Window: Ensure PromQL queries specify an evaluation duration of at least 300s (5 minutes) to avoid flapping.

  4. SLOs: Delegate dedicated Service Level Objective tracking and error budget burn-rate alerting to the google-cloud-slo-alert-configuration skill, handing off the SLI metric resolved by schema discovery (see Delegate SLOs and Apply the Fallback Rule).

  5. Notification Channels: Attach notification channels using the cloud-monitoring-notification-channels-configuration skill. Always prompt the user to ask if they would like to configure notification channels if none were provided.

  6. Run & Include CLI Commands for Reproducibility: Always run the python3 scripts/discover_metric_schema.py, gcloud monitoring metric-descriptors list, and python3 scripts/lint_promql.py "<promql_expression>" commands to discover schemas and validate PromQL expressions, and include the exact commands in your response so users can reproduce your validation.

  7. Fleet-Wide Aggregation (sum by / group_by_fields): For fleet-wide scaling or multi-instance alerts, always include explicit grouping: use sum by (service, instance_id) (or sum by (service)) in PromQL queries, or aggregations { group_by_fields = [...] } in threshold queries — never use ungrouped scalar sum(...).

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs Python

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google
Publisher
Google (Official)
Source
google/skills · skills/cloud/cloud-monitoring-alert-configuration · commit 2194d3b
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google or Google.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download cloud-monitoring-alert-configuration.zip