跳到正文
Skillpedia
部署与云(DevOps)17k · #10790

whizard-telemetry-ruler

它能做什么

这个技能帮助 AI 智能体在 KubeSphere 中创建和管理告警规则。适合希望在出现特定事件、审计记录或日志行时收到告警的运维人员。

适用场景

  • ✓当你希望某个命名空间中出现特定 Kubernetes 事件时收到告警时。
  • ✓当你需要为可疑的审计事件或日志模式设置告警时。
  • ✓当告警规则需要更新或删除时。

技能链接

https://github.com/kubesphere/kubesphere/blob/master/skills/whizard-telemetry-ruler/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/kubesphere/kubesphere/blob/master/skills/whizard-telemetry-ruler/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请创建一条告警规则,当 payments 命名空间中的某个 Pod 记录内存不足(out-of-memory)错误时触发。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会编写规则组,可以是命名空间级或集群级,与你描述的事件或日志相匹配。然后它会把告警发送到你已设置的接收方。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

WizTelemetry Ruler

Overview

WizTelemetry Ruler is an extension component in the KubeSphere Observability Platform that provides event alerting and log alerting capabilities. It can define alerting rules for K8s native events, K8s/KubeSphere auditing events, and K8s logs, evaluate incoming event data and log data, and send alerts to specified receivers such as alertmanager, etc.

When to Use

  • Installing or configuring the WizTelemetry Ruler extension
  • Creating, updating, or deleting alerting rules (RuleGroup/ClusterRuleGroup)
  • Managing alerting configurations
  • Using the ruler API to manage alerting rules

Components

Component Description Default Enabled
whizard-telemetry-ruler Core ruler component for alerting true

Dependencies

  • WizTelemetry Platform Service (whizard-telemetry): Required
  • WizTelemetry Events (whizard-events): Required if event alerting is enabled
  • WizTelemetry Auditing (whizard-auditing): Required if auditing alerting is enabled
  • WizTelemetry Logging (whizard-logging): Required if logging alerting is enabled
  • WizTelemetry Notification (whizard-notification): Optional (for alert notification)
  • WizTelemetry Data Pipeline (vector): Required if alerting persistence is enabled
  • OpenSearch (opensearch): Required if alerting persistence is enabled

Installation

Prerequisites

REQUIRED: Complete all steps in order before generating InstallPlan.

Step 1: Get Available Clusters and Confirm Target

⚠️ CRITICAL: DO NOT proceed until target clusters are determined.

Step 1.1: Get available clusters

kubectl get clusters -o jsonpath='{.items[*].metadata.name}'

Step 1.2: Determine target clusters

  • If user explicitly specified target clusters in the request → Use those clusters directly, proceed to Step 2
  • If user did NOT specify target clusters → Ask user to confirm which clusters to deploy to, then proceed to Step 2

Ask user (if not specified):

Available clusters: host, dev
Which clusters do you want to deploy WizTelemetry Ruler to?

Step 2: Get Latest Version (if not provided by user)

MUST do this to get the latest version:

kubectl get extensionversions -n kubesphere-system -l kubesphere.io/extension-ref=whizard-telemetry-ruler -o jsonpath='{range .items[*]}{.spec.version}{"\n"}{end}' | sort -V | tail -1

This outputs the latest version (e.g., 1.5.0). Note this down - you'll use it in the InstallPlan.

Step 3: Get AlertManager Host (if configuring sink)

Only perform this step if you need to configure sink for alert notifications.

The AlertManager proxy service (alertmanager-proxy) is deployed in the host cluster and exposed via NodePort (default port: 31093).

Step 3.1: Get a host node IP

kubectl get nodes -o jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}'

Step 3.2: Confirm with user

Ask user to confirm the AlertManager host IP:

Detected AlertManager host: <NODE_IP>
Detected AlertManager port: 31093
Alert URL: http://<NODE_IP>:31093/api/v1/alerts

Do you want to use this URL for alert notifications?
  • If user confirms → Use http://<NODE_IP>:31093/api/v1/alerts as the sink URL
  • If user provides different URL → Use the user-specified URL

Note: If using WizTelemetry Notification extension, ensure it is installed before installing WizTelemetry Ruler.

Install WizTelemetry Ruler

⚠️ IMPORTANT: Complete prerequisite steps BEFORE this step.

Based on your selections:

  • Target clusters: User-confirmed cluster names
  • AlertManager URL: From Step 3 (if configuring sink)

⚠️ CRITICAL: InstallPlan metadata.name MUST be whizard-telemetry-ruler. DO NOT use any other name.

⚠️ CRITICAL: config field is YAML format. You MUST:

  • Use the config structure exactly as shown in the template
  • DO NOT add configuration fields that are not shown in the template
  • DO NOT modify the structure or hierarchy

⚠️ CRITICAL: All placeholders MUST be replaced with actual values. DO NOT leave them as placeholders.

Basic Installation Template (with AlertManager)

apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: whizard-telemetry-ruler
  namespace: kubesphere-system
spec:
  extension:
    name: whizard-telemetry-ruler
    version: <VERSION>  # From Step 2
  enabled: true
  upgrad
常见问题

规则可以匹配哪些内容?

该技能涵盖 Kubernetes 事件、Kubernetes 和 KubeSphere 审计事件,以及 Kubernetes 日志。

必须安装哪些扩展?

需要平台服务。事件、审计、日志和通知只有在你使用对应类型的告警时才需要。

告警需要存储吗?

只有开启告警持久化时才需要,它需要数据管道和 OpenSearch。

详情

作者的原始描述

Use when working with WizTelemetry Ruler extension for KubeSphere, including installation, configuration, alerting rules management

repo: kubesphere/kubesphere

热度

GitHub 星标
17k
排名
#10790
许可证
—
更新时间
2026/7/14

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能