跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
数据与分析

signoz-creating-alerts

Create a new SigNoz alert rule from a natural-language intent — threshold, anomaly, log-volume, error-rate, latency, or absent-data alerts across metrics, logs, traces, and exceptions. Make sure to use this skill whenever the user says "alert me when…", "notify me if…", "set up monitoring for…", "page me on…", "create an alert for…", or asks for a new alert/notification rule, even if they don't say the word "alert" explicitly. Also use it when someone asks to be notified about error rates, latency spikes, log volume, CPU/memory pressure, or anomalous behavior on a service or host.

SigNoz · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add SigNoz/agent-skills --skill signoz-creating-alerts

技能说明


name: signoz-creating-alerts description: > Create a new SigNoz alert rule from a natural-language intent: threshold, anomaly, log-volume, error-rate, latency, or absent-data alerts across metrics, logs, traces, and exceptions. Make sure to use this skill whenever the user says "alert me when…", "notify me if…", "set up monitoring for…", "page me on…", "create an alert for…", or asks for a new alert/notification rule, even if they don't say the word "alert" explicitly. Also use it when someone asks to be notified about error rates, latency spikes, log volume, CPU/memory pressure, or anomalous behavior on a service or host. argument-hint:

Alert Create

Build a SigNoz alert from natural-language intent. Autonomous agents and interactive clients follow the same flow.

Prerequisites

This skill calls SigNoz MCP tools (signoz_create_alert, signoz_list_alert_rules, signoz_get_field_keys, etc.). Confirm they are available; otherwise run signoz-mcp-setup. Never fall back to raw HTTP or fabricate alert configs.

When to use

Use this skill when the user wants to:

  • Create, set up, or configure a new alert rule.
  • Get paged or notified when a metric, log volume, latency, or error rate crosses a threshold.
  • Detect anomalous behavior on a service, host, or signal.
  • Catch silent data loss ("alert if data stops arriving from X").

Do NOT use when the user wants to:

  • Understand what an existing alert monitors → signoz-explaining-alerts.
  • Diagnose why an existing alert fired → signoz-investigating-alerts.
  • Modify thresholds, queries, or routing on an existing alert → call signoz_update_alert directly.

Required inputs (strict)

Alert creation writes to a shared system. Enforce this strict input contract; guesses create noisy alerts on the wrong service:

InputRequiredSource if missing
Alert intent (NL goal)yes$ARGUMENTS or recent user turn
Resource attribute filter (e.g. service.name, k8s.namespace.name, host.name)yesdiscover via signoz_get_field_keys + signoz_get_field_values
Threshold value(s)threshold / PromQL rulesderive a sensible default and surface in the preview; never substitute one for an absent-only request
Severityinferred from intentdefault warning; promote to critical only if user said "page", "wake up", "critical"
Notification routingyesdirect: verified channel name(s); policy: confirmation that an existing org policy should route this rule

If a required input is missing and undiscoverable, stop before any write and ask through the host's supported clarification UI.

What to include in the question:

  • What is missing: name it concretely (e.g. "which resource-attribute filter to use").
  • Candidate lists from discovery, with concrete values per attribute, e.g.: service.name → frontend, checkout, payments; host.name → prod-api-1, prod-db-1.
  • Free-form input so the user can name an unsurfaced value.

In autonomous mode, escalate or use upstream context; never call signoz_create_alert with a guessed value.

Workflow

Step 1: Parse intent and check what's missing

Extract from the user's request:

  1. What to monitor: signal type (metrics / logs / traces / exceptions) and the specific condition (CPU, error rate, p99 latency, log count, ...).
  2. Resource scope: which service, host, namespace, or environment.
  3. Threshold: numeric value and comparison ("above 80%", "below 100/s").
  4. Severity: implicit from urgency words ("page" → critical, default warning otherwise).
  5. Routing: explicit direct-channel name(s), or an explicit request to use a confirmed existing org notification policy.

Map signal phrasing to alert type:

User saysalertTypesignal
metric, CPU, memory, latency, request rateMETRIC_BASED_ALERTmetrics
log, error logs, log volume, log patternLOGS_BASED_ALERTlogs
trace, span, latency p99, slow requestsTRACES_BASED_ALERTtraces
exception, stack trace, crashEXCEPTIONS_BASED_ALERT(clickhouse_sql)

If resource scope is missing, run discovery (Step 2). If still missing after discovery, stop and ask the user (see Required inputs above).

Step 2: Discover resource attributes and metric names

When the user does not name a service / host / namespace, the SigNoz MCP guideline applies: always prefer a resource-attribute filter. Discover candidates instead of guessing:

  1. Call signoz_get_field_keys with fieldContext=resource to enumerate resource attributes for the chosen signal.
  2. Call signoz_get_field_values for the most likely attribute (typically service.name, then host.name, then k8s.namespace.name) to get concrete values.
  3. If the user mentioned a metric by name, call signoz_list_metrics with a search term to verify the exact OTel metric name. Wrong names create alerts that never fire.

Surface the candidates in your clarification request (see Required inputs above). Do not pick one.

Step 3: Check for duplicate alerts

Once the scope is resolved (either provided by the user or discovered in Step 2), check for existing alerts before probing data or authoring a new config; both are wasted work if the user wants to update an existing rule instead.

Call signoz_list_alert_rules and paginate through every page: pagination.hasMore is true until you have walked the full list. This lists configured alert rules (the durable state); do not use signoz_list_alerts, which returns currently triggered/active alert instances and will silently miss rules that are configured but not firing right now. Check for existing rules that match the user's intent (same signal + same scope + similar threshold). If a likely duplicate exists, surface it and ask whether to create a new one anyway, modify the existing one (out of scope here; use `signoz

阅读完整来源 ↗