cx-observability-setup

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Observability Setup Skill

可观测性设置Skill

Use this skill when setting up or configuring the observability stack - saved views, webhook integrations, notification channels, and external integrations. This is the "day 1 setup" skill for onboarding a new service or reconfiguring notification pipelines.

当设置或配置可观测性堆栈(已保存视图、Webhook集成、通知渠道和外部集成)时,使用此Skill。这是用于接入新服务或重新配置通知流水线的“首日设置”Skill。

CLI Commands

CLI 命令

Views

视图

CommandPurpose
cx views list
List all saved views
cx views get <id>
Get a view definition
cx views create --from-file
Create a saved view
cx views update <id> --from-file
Update a saved view
cx views delete <id>
Delete a saved view
cx views folders list
List view folders
cx views folders get <id>
Get a folder
cx views folders create --from-file
Create a folder
cx views folders update <id> --from-file
Update a folder
cx views folders delete <id>
Delete a folder
命令用途
cx views list
列出所有已保存视图
cx views get <id>
获取视图定义
cx views create --from-file
创建已保存视图
cx views update <id> --from-file
更新已保存视图
cx views delete <id>
删除已保存视图
cx views folders list
列出视图文件夹
cx views folders get <id>
获取文件夹信息
cx views folders create --from-file
创建文件夹
cx views folders update <id> --from-file
更新文件夹
cx views folders delete <id>
删除文件夹

Webhooks

Webhook

CommandPurpose
cx webhooks list
List all outgoing webhooks
cx webhooks get <id>
Get webhook details
cx webhooks create --from-file
Create a webhook
cx webhooks update <id> --from-file
Update a webhook
cx webhooks delete <id>
Delete a webhook
cx webhooks test <id>
Test a webhook
cx webhooks types
List available webhook types
cx webhooks actions list
List automation actions
cx webhooks actions get <id>
Get action details
cx webhooks actions create --from-file
Create an action
cx webhooks actions update --from-file
Update an action
cx webhooks actions delete <id>
Delete an action
cx webhooks actions batch --from-file
Batch execute actions
cx webhooks actions reorder --from-file
Reorder actions
命令用途
cx webhooks list
列出所有出站Webhook
cx webhooks get <id>
获取Webhook详情
cx webhooks create --from-file
创建Webhook
cx webhooks update <id> --from-file
更新Webhook
cx webhooks delete <id>
删除Webhook
cx webhooks test <id>
测试Webhook
cx webhooks types
列出可用的Webhook类型
cx webhooks actions list
列出自动化操作
cx webhooks actions get <id>
获取操作详情
cx webhooks actions create --from-file
创建操作
cx webhooks actions update --from-file
更新操作
cx webhooks actions delete <id>
删除操作
cx webhooks actions batch --from-file
批量执行操作
cx webhooks actions reorder --from-file
重新排序操作

Notifications

通知

CommandPurpose
cx notifications connectors list
List notification connectors
cx notifications connectors get <id>
Get connector details
cx notifications connectors create --from-file
Create a connector
cx notifications connectors update --from-file
Update a connector
cx notifications connectors delete <id>
Delete a connector
cx notifications connectors types
List connector types
cx notifications connectors entity-types
List entity types
cx notifications connectors entity-subtypes --type <type>
List entity subtypes
cx notifications routers list
List notification routers
cx notifications routers get <id>
Get router details
cx notifications routers create --from-file
Create a router
cx notifications routers update --from-file
Update a router
cx notifications routers delete <id>
Delete a router
cx notifications routers validate-matcher --from-file
Test entity label matcher
cx notifications presets list
List notification presets
cx notifications presets get <id>
Get preset details
cx notifications presets create --from-file
Create a custom preset
cx notifications presets update --from-file
Update a custom preset
cx notifications presets delete <id>
Delete a custom preset
cx notifications presets set-default <id>
Set default preset
cx notifications test connector --from-file
Test connector config
cx notifications test destination --from-file
Test destination
cx notifications test preset --from-file
Test preset config
cx notifications test routing-condition --from-file
Test routing condition
cx notifications test template-render --from-file
Test template rendering
命令用途
cx notifications connectors list
列出通知连接器
cx notifications connectors get <id>
获取连接器详情
cx notifications connectors create --from-file
创建连接器
cx notifications connectors update --from-file
更新连接器
cx notifications connectors delete <id>
删除连接器
cx notifications connectors types
列出连接器类型
cx notifications connectors entity-types
列出实体类型
cx notifications connectors entity-subtypes --type <type>
列出实体子类型
cx notifications routers list
列出通知路由器
cx notifications routers get <id>
获取路由器详情
cx notifications routers create --from-file
创建路由器
cx notifications routers update --from-file
更新路由器
cx notifications routers delete <id>
删除路由器
cx notifications routers validate-matcher --from-file
测试实体标签匹配器
cx notifications presets list
列出通知预设
cx notifications presets get <id>
获取预设详情
cx notifications presets create --from-file
创建自定义预设
cx notifications presets update --from-file
更新自定义预设
cx notifications presets delete <id>
删除自定义预设
cx notifications presets set-default <id>
设置默认预设
cx notifications test connector --from-file
测试连接器配置
cx notifications test destination --from-file
测试目标地址
cx notifications test preset --from-file
测试预设配置
cx notifications test routing-condition --from-file
测试路由条件
cx notifications test template-render --from-file
测试模板渲染

Integrations

集成

CommandPurpose
cx integrations list
List all integrations
cx integrations get <id>
Get integration details
cx integrations create --from-file
Create an integration
cx integrations update <id> --from-file
Update an integration
cx integrations delete <id>
Delete an integration
cx integrations test --from-file
Test integration config
cx integrations template
Get integration template
cx integrations definition <id>
Get integration definition
cx integrations deployed <id>
Get deployed integration
cx integrations extensions list
List available extensions
cx integrations extensions get <id>
Get extension details
cx integrations extensions deployed
List deployed extensions
cx integrations extensions deploy --from-file
Deploy an extension
cx integrations extensions update --from-file
Update deployed extension
cx integrations extensions undeploy --from-file
Undeploy an extension
cx integrations contextual-data list
List contextual data integrations
cx integrations contextual-data get <id>
Get contextual data details
cx integrations contextual-data create --from-file
Create contextual data integration
cx integrations contextual-data update <id> --from-file
Update contextual data integration
cx integrations contextual-data delete <id>
Delete contextual data integration
cx integrations contextual-data definition <id>
Get contextual data definition
cx integrations contextual-data test <id>
Test contextual data integration
All commands support
-o json
for structured output and
-p <profile>
for profile selection.

命令用途
cx integrations list
列出所有集成
cx integrations get <id>
获取集成详情
cx integrations create --from-file
创建集成
cx integrations update <id> --from-file
更新集成
cx integrations delete <id>
删除集成
cx integrations test --from-file
测试集成配置
cx integrations template
获取集成模板
cx integrations definition <id>
获取集成定义
cx integrations deployed <id>
获取已部署集成
cx integrations extensions list
列出可用扩展
cx integrations extensions get <id>
获取扩展详情
cx integrations extensions deployed
列出已部署扩展
cx integrations extensions deploy --from-file
部署扩展
cx integrations extensions update --from-file
更新已部署扩展
cx integrations extensions undeploy --from-file
取消部署扩展
cx integrations contextual-data list
列出上下文数据集成
cx integrations contextual-data get <id>
获取上下文数据详情
cx integrations contextual-data create --from-file
创建上下文数据集成
cx integrations contextual-data update <id> --from-file
更新上下文数据集成
cx integrations contextual-data delete <id>
删除上下文数据集成
cx integrations contextual-data definition <id>
获取上下文数据定义
cx integrations contextual-data test <id>
测试上下文数据集成
所有命令都支持
-o json
以输出结构化数据,以及
-p <profile>
用于选择配置文件。

New Service Setup Workflow

新服务接入流程

When onboarding a new service, follow this checklist:
接入新服务时,请遵循以下检查清单:

1. Create Saved Views

1. 创建已保存视图

Set up views for the service's key log queries:
bash
cx views folders create --from-file folder.json
cx views create --from-file view.json
为服务的关键日志查询设置视图:
bash
cx views folders create --from-file folder.json
cx views create --from-file view.json

2. Set Up Notification Connectors

2. 设置通知连接器

Configure channels (Slack, PagerDuty, email):
bash
cx notifications connectors types -o json
cx notifications connectors create --from-file slack-connector.json
配置渠道(Slack、PagerDuty、邮件):
bash
cx notifications connectors types -o json
cx notifications connectors create --from-file slack-connector.json

3. Configure Notification Routing

3. 配置通知路由

Route alerts to the right channels:
bash
cx notifications routers create --from-file router.json
将告警路由到正确的渠道:
bash
cx notifications routers create --from-file router.json

4. Set Up Webhooks

4. 设置Webhook

Configure outgoing webhooks for external integrations:
bash
cx webhooks types -o json
cx webhooks create --from-file webhook.json
cx webhooks test <webhook-id>
为外部集成配置出站Webhook:
bash
cx webhooks types -o json
cx webhooks create --from-file webhook.json
cx webhooks test <webhook-id>

5. Install Integrations

5. 安装集成

Deploy relevant integrations and extensions:
bash
cx integrations list -o json
cx integrations create --from-file integration.json
cx integrations extensions deploy --from-file extension.json
部署相关集成和扩展:
bash
cx integrations list -o json
cx integrations create --from-file integration.json
cx integrations extensions deploy --from-file extension.json

6. Create Dashboard

6. 创建仪表板

Use the
cx-create-dashboard
skill for the full dashboard creation workflow.
使用
cx-create-dashboard
Skill 完成完整的仪表板创建流程。

7. Create SLOs

7. 创建SLO

Use the
cx-incident-management
skill for SLO creation and monitoring.

使用
cx-incident-management
Skill 完成SLO创建和监控。

Notification Setup Workflow

通知设置流程

Detailed notification channel configuration:
详细的通知渠道配置步骤:

1. List Available Connector Types

1. 列出可用的连接器类型

bash
cx notifications connectors types -o json
bash
cx notifications connectors types -o json

2. Create a Connector

2. 创建连接器

bash
cx notifications connectors create --from-file connector.json
bash
cx notifications connectors create --from-file connector.json

3. Create a Router

3. 创建路由器

bash
cx notifications routers create --from-file router.json
bash
cx notifications routers create --from-file router.json

4. Assign or Create a Preset

4. 分配或创建预设

bash
cx notifications presets list -o json
cx notifications presets create --from-file preset.json
cx notifications presets set-default <preset-id>
bash
cx notifications presets list -o json
cx notifications presets create --from-file preset.json
cx notifications presets set-default <preset-id>

5. Test End-to-End

5. 端到端测试

bash
cx notifications test connector --from-file test-connector.json
cx notifications test destination --from-file test-destination.json
cx notifications test routing-condition --from-file test-condition.json

bash
cx notifications test connector --from-file test-connector.json
cx notifications test destination --from-file test-destination.json
cx notifications test routing-condition --from-file test-condition.json

Webhook Setup

Webhook 设置

1. List Webhook Types

1. 列出Webhook类型

bash
cx webhooks types -o json
bash
cx webhooks types -o json

2. Create Webhook

2. 创建Webhook

Template from an existing webhook if possible:
bash
cx webhooks get <existing-id> -o json > webhook-template.json
cx webhooks create --from-file webhook.json
尽可能从现有Webhook生成模板:
bash
cx webhooks get <existing-id> -o json > webhook-template.json
cx webhooks create --from-file webhook.json

3. Test Webhook

3. 测试Webhook

bash
cx webhooks test <webhook-id>
bash
cx webhooks test <webhook-id>

4. Create Automation Actions (Optional)

4. 创建自动化操作(可选)

bash
cx webhooks actions create --from-file action.json
cx webhooks actions reorder --from-file order.json

bash
cx webhooks actions create --from-file action.json
cx webhooks actions reorder --from-file order.json

Key Principles

核心原则

  • Always test after setup - use
    cx notifications test
    ,
    cx webhooks test
    ,
    cx integrations test
  • Use
    --from-file
    for complex JSON payloads - pipe from stdin or use a file
  • Template from existing -
    cx <command> get <id> -o json > template.json
    before creating
  • Check connector types first -
    cx notifications connectors types
    and
    cx webhooks types
    before creating

  • 设置后务必测试 - 使用
    cx notifications test
    cx webhooks test
    cx integrations test
  • 使用
    --from-file
    处理复杂JSON负载 - 从标准输入管道或使用文件
  • 从现有资源生成模板 - 创建前使用
    cx <command> get <id> -o json > template.json
  • 先检查连接器类型 - 创建前使用
    cx notifications connectors types
    cx webhooks types

Related Skills

相关Skill

  • cx-create-dashboard
    - dashboard creation workflow for new services
  • cx-incident-management
    - SLO creation and alert triage workflows
  • cx-alerts
    - alert definitions that trigger notifications
  • cx-telemetry-querying
    - verify data flows after setup
  • cx-create-dashboard
    - 新服务的仪表板创建流程
  • cx-incident-management
    - SLO创建和告警分流流程
  • cx-alerts
    - 触发通知的告警定义
  • cx-telemetry-querying
    - 设置后验证数据流