Logo Whizard Telemetry Ruler

Whizard Telemetry Ruler

Tổ chứcPhổ biến
kubesphere
whizard-telemetry-ruler

Dùng khi làm việc với extension WizTelemetry Ruler cho KubeSphere, bao gồm cài đặt, cấu hình và quản lý quy tắc cảnh báo.

Add to TypingMind

Tổng quan

Nhà phát hànhkubesphere
Kho mãkubesphere
Tên kỹ năngwhizard-telemetry-ruler
Sao
17.1K
Bản fork
2.8K
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được kubesphere công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Whizard Telemetry Ruler trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/kubesphere/kubesphere/tree/master/skills/whizard-telemetry-ruler
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kubesphere/kubesphere.git /tmp/kubesphere
mkdir -p .claude/skills
cp -r /tmp/kubesphere/skills/whizard-telemetry-ruler .claude/skills/whizard-telemetry-ruler
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Whizard Telemetry Ruler trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Whizard Telemetry Ruler ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Whizard Telemetry Ruler với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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

ComponentDescriptionDefault Enabled
whizard-telemetry-rulerCore ruler component for alertingtrue

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

bash
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:

bash
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

bash
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)
yaml
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
  upgradeStrategy: Manual
  config: |
    whizard-telemetry-ruler:
      config:
        sinks:
          - name: alertmanager
            type: webhook
            config:
              url: http://<ALERT_MANAGER_HOST>:31093/api/v1/alerts  # From Step 3
  clusterScheduling:
    placement:
      clusters:
        - <TARGET_CLUSTERS>
Installation with Custom Configuration Template (with all alerting types)
yaml
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
  upgradeStrategy: Manual
  config: |
    whizard-telemetry-ruler:
      auditingAlerting:
        enabled: true
      eventsAlerting:
        enabled: true
      loggingAlerting:
        enabled: false
      config:
        sinks:
        - name: alertmanager
          type: webhook
          config:
            url: http://<ALERT_MANAGER_HOST>:31093/api/v1/alerts  # From Step 3
  clusterScheduling:
    placement:
      clusters:
        - <TARGET_CLUSTERS>

Replace placeholders:

  • <VERSION>: From Step 2 (e.g., 1.5.0)
  • <TARGET_CLUSTERS>: User-confirmed cluster names
  • <ALERT_MANAGER_HOST>: From Step 3 (auto-detected or user-confirmed node IP)
Enable Log Alerting Template
yaml
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
  upgradeStrategy: Manual
  config: |
    whizard-telemetry-ruler:
      auditingAlerting:
        enabled: true
      eventsAlerting:
        enabled: true
      loggingAlerting:
        enabled: true
      config:
        sinks:
        - name: alertmanager
          type: webhook
          config:
            url: http://<ALERT_MANAGER_HOST>:31093/api/v1/alerts  # From Step 3
  clusterScheduling:
    placement:
      clusters:
        - <TARGET_CLUSTERS>
Enable Alerting Persistence Template
yaml
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
  upgradeStrategy: Manual
  config: |
    global:
       alertingPersistence:
         enabled: true
    whizard-telemetry-ruler:
      config:
        sinks:
        - name: alertmanager
          type: webhook
          config:
            url: http://<ALERT_MANAGER_HOST>:31093/api/v1/alerts  # From Step 3
    alerting-persistence:
      sinks:
        opensearch:
          enabled: true
  clusterScheduling:
    placement:
      clusters:
        - <TARGET_CLUSTERS>

Configuration Parameters

Alerting Type Parameters

ParameterTypeDefaultDescription
whizard-telemetry-ruler.auditingAlerting.enabledbooltrueEnable auditing alert
whizard-telemetry-ruler.eventsAlerting.enabledbooltrueEnable events alert
whizard-telemetry-ruler.loggingAlerting.enabledboolfalseEnable log alert

Sink Configuration Parameters

ParameterTypeDefaultDescription
whizard-telemetry-ruler.config.sinks[].namestringSink name
whizard-telemetry-ruler.config.sinks[].typestringSink type (webhook, etc.)
whizard-telemetry-ruler.config.sinks[].config.urlstringWebhook URL

Alert Persistence Parameters (Optional)

ParameterTypeDefaultDescription
global.alertingPersistence.enabledboolfalseEnable alert persistence
alerting-persistence.sinks.opensearch.enabledboolfalseEnable OpenSearch sink for alerts
alerting-persistence.sinks.opensearch.ism_policy.enablebooltrueEnable ISM policy
alerting-persistence.sinks.opensearch.ism_policy.min_index_agestring"7d"Minimum index retention period

Resource Parameters

ParameterTypeDefaultDescription
whizard-telemetry-ruler.resources.limits.cpustring2ruler CPU limit
whizard-telemetry-ruler.resources.limits.memorystring4Giruler memory limit
whizard-telemetry-ruler.resources.requests.cpustring100mruler CPU request
whizard-telemetry-ruler.resources.requests.memorystring20Miruler memory request
whizard-telemetry-ruler.kubectl.resources.limits.cpustring100mkubectl CPU limit
whizard-telemetry-ruler.kubectl.resources.limits.memorystring256Mikubectl memory limit
whizard-telemetry-ruler.kubectl.resources.requests.cpustring100mkubectl CPU request
whizard-telemetry-ruler.kubectl.resources.requests.memorystring256Mikubectl memory request

Node Scheduling Parameters

ParameterTypeDefaultDescription
whizard-telemetry-ruler.nodeSelectormap{}Node selector
whizard-telemetry-ruler.tolerationslist[]Tolerations
whizard-telemetry-ruler.affinitymap{}Affinity

Alerting Rule API

RuleGroup API (Namespaced)

List RuleGroups
bash
curl -X GET "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/namespaces/<namespace>/rulegroups?clusterName=host" \
  -H "X-Remote-User: admin"
Get RuleGroup
bash
curl -X GET "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/namespaces/<namespace>/rulegroups/<name>?clusterName=host" \
  -H "X-Remote-User: admin"
Create RuleGroup
bash
curl -X POST "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/namespaces/<namespace>/rulegroups?clusterName=host" \
  -H "X-Remote-User: admin" \
  -H "Content-Type: application/json" \
  -d '{
    "apiVersion": "logging.whizard.io/v1alpha1",
    "kind": "RuleGroup",
    "metadata": {
      "name": "<rulegroup-name>",
      "namespace": "<namespace>"
    },
    "spec": {
      "type": "events",
      "rules": [
        {
          "name": "test-rule",
          "desc": "Test rule",
          "enable": true,
          "expr": {
            "kind": "rule",
            "condition": "reason == \"FailedCreatePodSandBox\""
          },
          "alerts": {
            "severity": "warning",
            "message": "Pod sandbox creation failed",
            "labels": {
              "alert": "test"
            },
            "annotations": {
              "summary": "Pod sandbox creation failed"
            }
          }
        }
      ]
    }
  }'
Update RuleGroup
bash
curl -X PUT "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/namespaces/<namespace>/rulegroups/<name>?clusterName=host" \
  -H "X-Remote-User: admin" \
  -H "Content-Type: application/json" \
  -d '<UPDATED_RULEGROUP>'
Delete RuleGroup
bash
curl -X DELETE "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/namespaces/<namespace>/rulegroups/<name>?clusterName=host" \
  -H "X-Remote-User: admin"

ClusterRuleGroup API (Cluster-scoped)

List ClusterRuleGroups
bash
curl -X GET "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/clusterrulegroups?clusterName=host" \
  -H "X-Remote-User: admin"
Get ClusterRuleGroup
bash
curl -X GET "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/clusterrulegroups/<name>?clusterName=host" \
  -H "X-Remote-User: admin"
Create ClusterRuleGroup
bash
curl -X POST "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/clusterrulegroups?clusterName=host" \
  -H "X-Remote-User: admin" \
  -H "Content-Type: application/json" \
  -d '{
    "apiVersion": "logging.whizard.io/v1alpha1",
    "kind": "ClusterRuleGroup",
    "metadata": {
      "name": "<clusterrulegroup-name>"
    },
    "spec": {
      "type": "auditing",
      "rules": [
        {
          "name": "audit-rule",
          "desc": "Audit rule",
          "enable": true,
          "expr": {
            "kind": "rule",
            "condition": "verb == \"delete\""
          },
          "alerts": {
            "severity": "error",
            "message": "Delete operation detected",
            "labels": {
              "type": "audit"
            }
          }
        }
      ]
    }
  }'
Delete ClusterRuleGroup
bash
curl -X DELETE "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/logging.whizard.io/v1alpha1/clusterrulegroups/<name>?clusterName=host" \
  -H "X-Remote-User: admin"

Alert Query API

Query Alerts

Query alerts with filters and time range:

bash
curl -X POST "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/events.alerting.wiztelemetry.io/v1alpha1/query" \
  -H "X-Remote-User: admin" \
  -H "Content-Type: application/json" \
  -d '{
    "cluster": "host",
    "startTime": 1704067200,
    "endTime": 1704153600,
    "from": 0,
    "size": 10,
    "order": "descending",
    "parameters": [
      {
        "field": "severity",
        "operator": "=",
        "value": "error"
      },
      {
        "field": "alertname",
        "operator": "?",
        "values": ["pod*"]
      }
    ]
  }'

Query Statistics

Get alert statistics (overview, histogram, by severity, etc.):

bash
curl -X POST "http://whizard-telemetry-apiserver.extension-whizard-telemetry.svc:80/kapis/events.alerting.wiztelemetry.io/v1alpha1/statistics" \
  -H "X-Remote-User: admin" \
  -H "Content-Type: application/json" \
  -d '{
    "cluster": "host",
    "statisticsType": 501,
    "startTime": 1704067200,
    "endTime": 1704153600
  }'

Alert Query Parameters

ParameterTypeRequiredDescription
clusterstringYesCluster name (e.g., host, member-1)
startTimeint64NoStart time (Unix timestamp), default: 30 days ago
endTimeint64NoEnd time (Unix timestamp), default: now
fromint64NoOffset for pagination, default: 0
sizeint64NoNumber of results, default: 10
orderstringNoSort order: "ascending" or "descending", default: descending
statisticsTypeintNoStatistics type (see Statistics Type Values)
parametersarrayNoFilter parameters

Filter Parameter Structure

FieldTypeDescription
fieldstringField name to filter on
operatorstringOperator (see Filter Operators)
valueinterface{}Single value for =, !=, >, >=, <, <=
valuesarrayMultiple values for In, NotIn, ?, !?, , !

Filter Operators

OperatorSymbolDescription
Equals=Exact match
NotEquals!=Not equal
Greater>Greater than
GreaterOrEqual>=Greater or equal
Less<Less than
LessOrEqual<=Less or equal
InInIn list
NotInNotInNot in list
MatchesFuzzy?Fuzzy match (supports * and ?)
NotMatchesFuzzy!?Not fuzzy match
MatchesRegex~Regex match
NotMatchesRegex!~Not regex match
ExistsExistsField exists
NotExistsNotExistsField does not exist

Statistics Type Values

TypeValueDescription
StatisticsEventsAlertingNone500No statistics
StatisticsEventsAlertingDateHistogram501Time histogram
StatisticsEventsAlertingOverview502Overview count
StatisticsEventsAlertingByNamespace503By namespace
StatisticsEventsAlertingByRuleGroup504By rule group
StatisticsEventsAlertingByAlertName505By alert name
StatisticsEventsAlertingByAlertType506By alert type
StatisticsEventsAlertingBySeverity507By severity

Available Alert Fields

FieldTypeDescription
alertnamestringAlert name
severitystringAlert severity (info, warning, error, critical)
namespacestringNamespace
rulegroupstringRule group name
clusterstringCluster name
rulekindstringRule kind (RuleGroup, ClusterRuleGroup)
ruletypestringRule type (events, auditing, logs)
alerttypestringAlert type
labelsstringAlert labels (JSON string)
annotationsstringAlert annotations (JSON string)
firingboolIs firing
pendingboolIs pending
inhibitedboolIs inhibited
silencedboolIs silenced
startsatint64Start timestamp
endsatint64End timestamp
updatedatint64Update timestamp

Alert Query Examples

Query by Severity
json
{
  "cluster": "host",
  "parameters": [
    {
      "field": "severity",
      "operator": "=",
      "value": "error"
    }
  ],
  "size": 20
}
Query by Time Range
json
{
  "cluster": "host",
  "startTime": 1704067200,
  "endTime": 1704153600,
  "size": 100
}
Query by Namespace and RuleGroup
json
{
  "cluster": "host",
  "parameters": [
    {
      "field": "namespace",
      "operator": "=",
      "value": "default"
    },
    {
      "field": "rulegroup",
      "operator": "=",
      "value": "my-rule-group"
    }
  ]
}
Fuzzy Match Alert Name
json
{
  "cluster": "host",
  "parameters": [
    {
      "field": "alertname",
      "operator": "?",
      "values": ["pod*", "container*"]
    }
  ]
}
Query with Statistics
json
{
  "cluster": "host",
  "startTime": 1704067200,
  "endTime": 1704153600,
  "statisticsType": 507
}

RuleGroup API Query Parameters

ParameterTypeDescription
clusterstringCluster name, empty means host cluster
namestringName used for filtering
labelSelectorstringLabel selector used for filtering
statusstringFilter by enabled status (true or false)
builtinstringFilter by builtin status (true or false)
typestringFilter by type (logs, events, auditing)
pageintPage number
limitintItems per page
orderBystringSort parameter (e.g., createTime)
ascendingboolSort order

Rule Type Values

TypeDescription
eventsK8s native events
auditingK8s/KubeSphere auditing events
logsK8s container logs

Alert Severity Values

SeverityDescription
infoInformational
warningWarning
errorError
criticalCritical

Rule Expression Kind Values

KindDescription
ruleRegular rule with condition
macroMacro rule
listList rule
aliasAlias rule

Condition Detailed Explanation

The condition field is used to filter events/logs/auditing that match specific criteria. It supports various operators and field references.

Operators
OperatorDescriptionExample
==Equalsreason == "FailedCreatePodSandBox"
!=Not equalsverb != "delete"
=~Regex matchmessage =~ "error.*failed"
!~Not regex matchmessage !~ "debug"
&&ANDreason == "Failed" && type == "Warning"
||ORreason == "Failed" || reason == "Error"
Available Fields by Type
Events Type (type: events)
FieldTypeDescription
reasonstringEvent reason (e.g., FailedCreatePodSandBox)
typestringEvent type (Normal, Warning)
involvedObject.kindstringObject kind (Pod, Deployment, etc.)
involvedObject.namestringObject name
involvedObject.namespacestringObject namespace
messagestringEvent message
sourcestringEvent source component
countintEvent count

Events Examples:

json
// Alert when pod sandbox creation fails
"condition": "reason == \"FailedCreatePodSandBox\""

// Alert on warning events for specific namespace
"condition": "type == \"Warning\" && involvedObject.namespace == \"default\""

// Alert when event count exceeds threshold
"condition": "count >= 5"
Auditing Type (type: auditing)
FieldTypeDescription
verbstringHTTP verb (get, post, put, delete, etc.)
userstringUsername
sourceIPsstringSource IP addresses
resource.groupstringResource API group
resource.versionstringResource API version
resource.resourcestringResource type (pods, deployments, etc.)
objectRef.namestringObject name
objectRef.namespacestringObject namespace
responseStatus.codeintHTTP response code
levelstringAudit level (None, Metadata, Request, RequestResponse)

Auditing Examples:

json
// Alert on delete operations
"condition": "verb == \"delete\""

// Alert on failed requests (4xx/5xx)
"condition": "responseStatus.code >= 400"

// Alert on specific user activity
"condition": "user == \"admin\" && verb == \"delete\""

// Alert on sensitive resources
"condition": "resource.resource == \"secrets\""
Logs Type (type: logs)
FieldTypeDescription
logstringLog message content
containerstringContainer name
podstringPod name
namespacestringNamespace name
clusterstringCluster name

Logs Examples:

json
// Alert on error keyword
"condition": "log contains \"error\""

// Alert on specific container
"condition": "container == \"nginx\""

// Alert on OOM kills
"condition": "log contains \"OOMKilled\""

// Alert on multiple keywords
"condition": "log contains \"failed\" && log contains \"connection\""

// Alert using regex
"condition": "log =~ \"error.*timeout|timeout.*error\""
Macro Usage

Macros allow reusable expressions:

json
{
  "expr": {
    "kind": "macro",
    "macro": "high_error_rate"
  }
}
List Usage

Lists allow grouping values:

json
{
  "expr": {
    "kind": "list",
    "list": ["error", "warning", "critical"]
  }
}
Alias Usage

Aliases provide descriptive names for complex expressions:

json
{
  "expr": {
    "kind": "alias",
    "alias": "Pod_Sandbox_Failure"
  }
}

Sliding Window Alert (Log Alerting)

For log alerting with sliding window:

json
{
  "name": "log-rate-rule",
  "desc": "Log rate alert",
  "enable": true,
  "expr": {
    "kind": "rule",
    "condition": "log contains \"error\""
  },
  "alerts": {
    "severity": "error",
    "message": "High error log rate"
  },
  "slidingWindow": {
    "windowSize": "5m",
    "slidingInterval": "1m",
    "count": 100
  }
}
ParameterTypeDescription
slidingWindow.windowSizestringWindow size (e.g., "300ms", "5m")
slidingWindow.slidingIntervalstringSlide step (must be less than windowSize)
slidingWindow.countintCount threshold to trigger alert

Extension Operations

Check Extension Status

bash
kubectl get installplan whizard-telemetry-ruler
kubectl get extensionversions -l kubesphere.io/extension-ref=whizard-telemetry-ruler

Uninstall Extension

Uninstall from all clusters:

bash
kubectl delete installplan whizard-telemetry-ruler

Uninstall from specific cluster:

To remove WizTelemetry Ruler from a specific cluster, update the InstallPlan by removing that cluster from clusterScheduling.placement.clusters:

yaml
apiVersion: kubesphere.io/v1alpha1
kind: InstallPlan
metadata:
  name: whizard-telemetry-ruler
  namespace: kubesphere-system
spec:
  extension:
    name: whizard-telemetry-ruler
    version: <VERSION>
  enabled: true
  upgradeStrategy: Manual
  clusterScheduling:
    placement:
      clusters:
        - <REMAINING_CLUSTERS>  # Remove the cluster you want to uninstall from

Alert Notification Configuration

To send alerts through WizTelemetry Notification extension, configure the sink URL to point to the alertmanager-proxy service.

Auto-detection (recommended): Use the command from Step 3 to get the host node IP automatically.

yaml
whizard-telemetry-ruler:
  config:
    sinks:
    - name: alertmanager
      type: webhook
      config:
        url: http://<ALERT_MANAGER_HOST>:31093/api/v1/alerts
  • <ALERT_MANAGER_HOST>: From Step 3 (auto-detected or user-confirmed)
  • Default NodePort: 31093
  • Service: alertmanager-proxy in kubesphere-system namespace

Câu hỏi thường gặp

Kỹ năng AI Whizard Telemetry Ruler làm được gì?

Dùng khi làm việc với extension WizTelemetry Ruler cho KubeSphere, bao gồm cài đặt, cấu hình và quản lý quy tắc cảnh báo.

Vì sao nên dùng Whizard Telemetry Ruler trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Whizard Telemetry Ruler là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Whizard Telemetry Ruler trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/kubesphere/kubesphere/tree/master/skills/whizard-telemetry-ruler. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Whizard Telemetry Ruler?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Whizard Telemetry Ruler với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Whizard Telemetry Ruler với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Whizard Telemetry Ruler có miễn phí không?

Kỹ năng này được kubesphere phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇