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

google-cloud-slo-alert-configuration

Skill này làm gì

Skill này giúp thiết lập cảnh báo mục tiêu mức dịch vụ (SLO) trên Google Cloud. Skill dành cho các đội muốn được cảnh báo khi một dịch vụ không đạt mục tiêu độ tin cậy.

Khi nào nên dùng

  • ✓Khi bạn muốn thiết lập một mục tiêu mức dịch vụ (SLO) trên Google Cloud.
  • ✓Khi bạn cần cảnh báo SLO cho một dịch vụ đã đăng ký trong App Hub hoặc một tài nguyên có tên.
  • ✓Khi bạn muốn mã Terraform cho các chính sách cảnh báo dựa trên SLO.

Liên kết skill

https://github.com/google/skills/blob/main/skills/cloud/google-cloud-slo-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/google-cloud-slo-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

“Thiết lập cảnh báo SLO cho dịch vụ checkout của tôi để cả nhóm được báo khi độ tin cậy giảm xuống dưới mục tiêu.”

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

Cách hoạt động

Skill hướng dẫn bạn qua một trình hướng dẫn bốn bước, gồm phạm vi dịch vụ, mức dịch vụ, metric cần đo và điều kiện cảnh báo. Sau đó skill viết cấu hình Terraform.

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.

SLO Alert Configuration Setup Wizard

This skill guides the user through a structured conversation to configure Cloud Monitoring PromQL-based Service Level Objective (SLO) alerting policies on Google Cloud in Terraform. Your role is to act as a setup wizard that conceptually models the 4 key components of an SLO API (Service Scope, Service Level, SLI, and Alert Condition), gathers the requirements, and outputs a Terraform configuration.

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:google-cloud-slo-alert-configuration)" and append agent-skills/1.0 (skill:google-cloud-slo-alert-configuration) to User-Agent headers.

CRITICAL RULES

  • Structured Conversation: You MUST follow the 4-step wizard workflow below.

  • Gather Missing Information: Evaluate all 4 steps below first. Ask the user for all missing information across all steps in a single response.

    • DO NOT stop after finding the first missing piece of information.

    • DO NOT use the ask_question tool. You must ask questions using plain text in your response and end your turn to wait for the user to reply.

    • DO NOT write the Terraform configuration if information is missing.

  • Skip What Is Known: If the user has already provided information for a step in their previous messages or initial prompt DO NOT ask them for it. Move to the next missing piece of information. If ALL information for Steps 1-4 is provided, call write_to_file to generate the Terraform configuration without asking for permission to proceed.

  • Provide Best Practices: Whenever you ask the user a question, you MUST explicitly state the recommended "Best Practice".

  • Best Practice Shortcut: If the user asks for "best practices" or similar, do not overwrite their explicit inputs. SKIP all remaining data gathering and keep any specific targets or custom metrics they provided. For all fields left blank, apply the recommended defaults defined in the "SRE Best Practice Suggestion" of each step.

  • User Labels: Include a user_labels block in all google_monitoring_alert_policy resources to track policies created by this skill:

    user_labels = {
      created-with-google-skill = "google-cloud-slo-alert-configuration"
    }
    
  • Terraform Output: Write the generated observability configuration ONLY as Terraform (.tf) files using the google_monitoring_alert_policy resource and condition_prometheus_query_language resources.

  • Alert Strategy: ALWAYS include an alert_strategy block with an auto_close setting. Leave notification_channels empty unless the user provides one. Provide plain-English explanations of the PromQL math before finalizing the conversation.


SETUP WIZARD WORKFLOW

Step 1: Define ServiceScope

  1. Check Context: Identify target resource, service, workload, or application the user wants to monitor. If you already know, proceed. Otherwise ask the user to identify it.

  2. Autonomous Investigation: If the user specified a project or general service name without providing specifics, autonomously use gcloud to discover the target services in their environment. If multiple services or workloads are discovered, list all of them and suggest applying SLO ONLY to the most critical backend services as a best practice.

    If you struggle to identify potential resources, ask the user to specify.

  3. Identify Underlying Infrastructure: To resolve the correct PromQL metric, you MUST know the underlying Google Cloud resource type.

    • If the user only provides a logical name or an App Hub Service/Workload name such as projects/.../services/frontend or projects/.../workloads/backend, you still need to know the underlying infrastructure.
    • If the prompt provides the underlying infrastructure, use that information. Do NOT attempt to discover it.
    • If you don't know the underlying infrastruc
Câu hỏi thường gặp

Skill có bao gồm chính sách cảnh báo thông thường không?

Không. Skill chỉ dành cho cảnh báo SLO, nên hãy dùng skill khác cho cảnh báo thông thường.

Skill thu thập thông tin như thế nào?

Skill hỏi tất cả chi tiết còn thiếu trong một tin nhắn, thay vì hỏi từng câu một.

Đầu ra là gì?

Cấu hình Terraform cho chính sách cảnh báo SLO.

Chi tiết

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

Configures Cloud Monitoring PromQL-based Service Level Objective (SLO) alerting policies on Google Cloud for resources registered in App Hub or individually specified. Generates Terraform output. Use when the user asks to configure an SLO or Service Level Objective. Don't use for standard alerting policies.

repo: google/skills

Độ phổ biến

Sao GitHub
22k
Vị trí xếp hạng
#10316
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ự