360 Secure SkillHub
360 安全技能中心

cx-observability-setup

该 Skill 提供 cx CLI 命令表和多步工作流,用于创建、更新或归档保存视图、通知连接器与路由、Webhook、集成以及 Fleet 配置组和覆盖层;写操作要求用户明确批准,并建议先测试。仪表板、SLO 和查询等流程由关联 Skill 负责。

分类:开发
coralogix
热度 59.52
最近更新 2026-12-02 17:31:42

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add coralogix/cx-cli/cx-observability-setup
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
cx-observability-setup
description
Use this skill when the user asks to "set up monitoring", "configure observability", "onboard new service", "create saved view", "set up notifications", "configure webhook", "set up Slack integration", "outgoing webhook", "automation action", "webhook for alerts", "create view", "saved view", "view folder", "organize dashboards", "install integration", "configure extension", "contextual data", "connect external service", "create notification connector", "set up email alerts", "configure PagerDuty", "notification routing", "deploy extension", "test webhook", "notification preset", "test notification", "webhook actions", "manage Fleet configuration groups", "manage configuration overlays", "configure Fleet collectors", "update a collector configuration group", or wants to set up, configure, or manage the observability stack for a service or team.
metadata
{"version":"0.1.0"}

Observability Setup 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.


CLI Commands

Views

Command Purpose
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

Webhooks

Command Purpose
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

Notifications

Command Purpose
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

Integrations

Command Purpose
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 --integration-id <deployed-id> Get the template of a deployed (managed) integration
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

Fleet Manager Configuration

Use these commands to manage collector configurations and overlays in Fleet Manager.

Command Purpose
cx configuration-groups list List configuration groups; use --include-archived, --page-size, and --page-token as needed
cx configuration-groups get <id> Get the latest group family and its remote configurations
cx configuration-groups create --from-file <file> Create a group with a raw Collector configuration or preset family
cx configuration-groups update <id> --update-mask <fields> --from-file <file> Update only the listed group fields
cx configuration-groups archive <id> Archive a group
cx configuration-overlays list List configuration overlays, including optional archived and page filters
cx configuration-overlays get <id> Get an overlay's configuration, targets, and schedules
cx configuration-overlays create --from-file <file> Create a custom configuration overlay
cx configuration-overlays update <id> --update-mask <fields> --from-file <file> Update only the listed overlay fields
cx configuration-overlays archive <id> Archive an overlay

Update masks are required. The API applies only fields named by --update-mask. A field named in the mask but omitted from the JSON body may be cleared or reset to its default, so include every intended value in the body. For example, --update-mask description should be paired with a body like {"description":"Updated description"}.

Keep changes inactive unless activation is requested. New groups and overlays default to inactive. Activating a group family can deliver its Collector configuration to matching agents. Activating an overlay requires at least one target and can change the configuration delivered to those agents. Use a non-production profile for lifecycle testing.

List responses are paginated. The JSON/TOON response includes a next_page_tokens map keyed by profile. Continue each profile separately with its token, keeping the same --include-archived and --page-size options. Do not reuse one profile's token for another profile.

Create, update, and archive are writes that require explicit approval from the user for the specific resource and operation. Do not pass --yes based on your own assessment that a change is safe; wait for the user's approval, then pass --yes to proceed non-interactively. Archive removes a resource from default lists; retrieve archived resources with --include-archived. An active overlay must be deactivated before it can be archived.

All commands support -o json for structured output and -p <profile> for profile selection.


New Service Setup Workflow

When onboarding a new service, follow this checklist:

1. Create Saved Views

Set up views for the service's key log queries:

cx views folders create --from-file folder.json
cx views create --from-file view.json

2. Set Up Notification Connectors

Configure channels (Slack, PagerDuty, email):

cx notifications connectors types -o json
cx notifications connectors create --from-file slack-connector.json

3. Configure Notification Routing

Route alerts to the right channels. A router picks up alerts by routing labels: the router's routingLabels use bare keys ({"team": "payments"}), and the alert carries the same values in entityLabels with a routing. prefix ("routing.team": "payments"). This works in both notification modes. Each rule's entityType says which mode it serves: CASES for Cases-mode alerts (the default for alerts made with the cx-alerts skill), ALERTS for alerts that set notificationGroup.router. Add CASES rules unless the user explicitly wants alert-based notifications. The routingLabels already choose which alerts reach the router, so a rule's condition is usually "true"; use a condition only to filter further, for example by priority.

{
  "router": {
    "name": "payments",
    "routingLabels": { "team": "payments" },
    "rules": [{
      "name": "payments-cases",
      "condition": "true",
      "entityType": "CASES",
      "targets": [{ "connectorId": "<connector-id>", "presetId": "<preset-id>" }]
    }],
    "fallbackTargets": []
  }
}
cx notifications routers create --from-file router.json

4. Set Up Webhooks

Configure outgoing webhooks for external integrations:

cx webhooks types -o json
cx webhooks create --from-file webhook.json
cx webhooks test <webhook-id>

5. Install Integrations

Deploy relevant integrations and extensions:

cx integrations list -o json
cx integrations create --from-file integration.json
cx integrations extensions deploy --from-file extension.json

6. Create Dashboard

Use the cx-dashboards skill for the full dashboard creation workflow.

7. Create SLOs

Use the cx-slos skill for SLO creation and monitoring.


Notification Setup Workflow

Detailed notification channel configuration:

1. List Available Connector Types

cx notifications connectors types -o json

2. Create a Connector

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

3. Create a Router

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

4. Assign or Create a Preset

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

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

1. List Webhook Types

cx webhooks types -o json

2. Create Webhook

Template from an existing webhook if possible:

cx webhooks get <existing-id> -o json > webhook-template.json
cx webhooks create --from-file webhook.json

3. Test Webhook

cx webhooks test <webhook-id>

4. Create Automation Actions (Optional)

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

Related Skills

  • cx-dashboards - dashboard creation and replace workflow
  • cx-slos - SLO creation and error-budget monitoring
  • cx-cases - triage the cases raised when alerts fire
  • cx-alerts - alert definitions that trigger notifications
  • cx-telemetry-querying - verify data flows after setup