Chuyển đến nội dung
Skillpedia
Triển khai và đám mây (DevOps)22k · #10276

gke-alert-configuration

Skill này làm gì

Skill này giúp agent AI thiết lập chính sách cảnh báo cho Google Kubernetes Engine bằng Terraform và Google Cloud Managed Service for Prometheus. Skill dành cho các nhóm muốn có cảnh báo hữu ích mà không quá nhiều nhiễu.

Khi nào nên dùng

  • ✓Khi bạn muốn cảnh báo Terraform cho độ trễ, lưu lượng hoặc tỷ lệ lỗi của dịch vụ GKE.
  • ✓Khi bạn cần cảnh báo cho mức bão hòa bộ nhớ hoặc sức khỏe tổng thể của cụm GKE.
  • ✓Khi bạn muốn kiểm tra các chính sách cảnh báo hiện có xem có nhiễu hoặc thiếu sót không.

Liên kết skill

https://github.com/google/skills/blob/main/skills/cloud/gke-alert-configuration/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/google/skills/blob/main/skills/cloud/gke-alert-configuration/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bạn có thể viết cảnh báo Terraform cho tỷ lệ lỗi và thời gian phản hồi của dịch vụ GKE của tôi không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent viết các chính sách cảnh báo dựa trên PromQL trong Terraform, dùng các quy tắc kiểu burn-rate cho các tín hiệu chính của dịch vụ, rồi kiểm tra trước khi triển khai.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

GKE Alert Configuration

This skill provides guidelines and best practices for creating robust, high-signal alerting policies for Google Kubernetes Engine workloads using Google Cloud Managed Service for Prometheus and Terraform. It ensures comprehensive coverage of the 4 Golden Signals and key cluster health metrics while minimizing alert noise.


Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:gke-alert-configuration)" and append agent-skills/1.0 (skill:gke-alert-configuration) to User-Agent headers.

Critical Rules

  • Negative Triggers and Scope Redirection for Non-GKE Standalone Runtimes:
    • This skill is strictly scoped to Google Kubernetes Engine (GKE) workloads, clusters, and services using PromQL and Google Cloud Managed Service for Prometheus.
    • Do not use for non-GKE compute runtimes, such as standalone Compute Engine virtual machines or standalone Cloud Run services without GKE.
    • STOP AND RESPOND DIRECTLY (Do Not Edit Files): When the user requests alert configuration for non-GKE compute infrastructure:
      1. Do not write, create, edit, or validate any Terraform files on disk.
      2. Immediately stop and respond directly to the user in chat:
        • Explicitly Clarify Out-of-Scope: State clearly that standalone Compute Engine virtual machine monitoring or standalone Cloud Run monitoring is out of scope for this GKE-specific PromQL alerting skill, which is designed specifically for GKE workloads using Google Cloud Managed Service for Prometheus and PromQL.
        • Do Not Generate GKE PromQL Alerts: Do not create or generate Kubernetes PromQL alert policies or fabricate Kubernetes container, pod, or node resources for non-GKE infrastructure.
        • Redirect the User: Guide and redirect the user to standard Google Cloud Monitoring metrics, such as compute.googleapis.com/instance/cpu/utilization or run.googleapis.com/request_latencies, using standard google_monitoring_alert_policy with condition_threshold or MQL, or recommend the relevant specialized Cloud observability skill.
  • Mandatory kube-state-metrics (KSM) Cost Guardrail:
    • Deploying open-source kube-state-metrics in Google Cloud Managed Service for Prometheus incurs billable metric ingestion costs.
    • STOP AND ASK PERMISSION FIRST (Do Not Edit Files): When a requested alert rule relies on Tier 2 KSM metrics (such as kube_cronjob_*, kube_pod_status_phase, kube_persistentvolume_*, kube_deployment_*, kube_statefulset_*, kube_job_*, or kube_daemonset_*), do not write, create, edit, or validate any Terraform files or generate alert policies before obtaining user approval.
    • Instead, you must immediately stop and respond directly to the user to:
      1. Alert the user that the requested alert requires kube-state-metrics.
      2. Explain the cost impact: Detail that kube-state-metrics incurs billable sample ingestion costs in Google Cloud Managed Service for Prometheus.
      3. Ask for explicit permission: Ask the user for explicit permission before assuming, enabling, or generating KSM-dependent alert configurations.
      4. Recommend filtering or allowlisting: Suggest and recommend filtering or allowlisting only the specific required metrics, such as using a PodMonitoring resource with metricRelabeling (action: keep) or KSM --metric-allowlist to minimize ingestion costs. Provide a concrete allowlist example.
    • Always prefer Non-KSM Native Alternatives (Tier 1 cAdvisor or native GKE metrics documented in [metrics_and_alerts_catalog.md](references/metrics_a
Câu hỏi thường gặp

Nó có dùng được cho máy ảo Compute Engine hoặc Cloud Run không?

Không. Nó dành cho khối lượng công việc và cụm GKE, nên các máy ảo Compute Engine độc lập và Cloud Run không có GKE nằm ngoài phạm vi.

Nó có tự viết cảnh báo không?

Có. Nó viết các chính sách cảnh báo Terraform để bạn xem lại và triển khai.

Nó có bao gồm sức khỏe cụm không?

Có. Nó bao gồm sức khỏe cụm và mức bão hòa bộ nhớ cùng với độ trễ và lỗi của dịch vụ.

Chi tiết

Mô tả gốc của tác giả

Configures alerting policies in Terraform for Google Kubernetes Engine (GKE) clusters, workloads, and services using PromQL and Google Cloud Managed Service for Prometheus. Use when writing, analyzing, validating, or deploying Terraform alerting policies to monitor GKE service latency, traffic, error rates using Multi-Window Multi-Burn-Rate SLO alerts, memory saturation, and cluster health such as CrashLoopBackOff and Node NotReady conditions. Don't use for non-GKE compute runtimes such as standalone Compute Engine VMs or standalone Cloud Run services without GKE.

repo: google/skills

Độ phổ biến

Sao GitHub
22k
Vị trí xếp hạng
#10276
Giấy phép
Apache-2.0
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự