elastic/agent-skills/kibana-alerting-rules
Claude Code and agent skill by elastic/agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Create and manage Kibana alerting rules. Use when creating, updating, or managing rule lifecycle (enable, disable, mute, snooze), choosing metric threshold rule types and params, or read-only find/list with tag filters.
Install
npx vskill@latest install elastic/agent-skills/kibana-alerting-rulesSKILL.md
The same SKILL.md was published earlier as elastic/agent-skills/kibana-alerting-rules.
Kibana Alerting
Turn a monitoring goal into working alerting and manage what already exists. Create Universal Alerting rules and action policies by default; use classic alerting only when the user names a classic rule type, edits an existing classic rule, or Universal Alerting is unavailable. Load only the chosen system's references before writing anything.
<!-- begin-partial: preamble -->
Environment Configuration
This skill executes Elasticsearch operations through the elastic CLI. If the `elastic` CLI is not installed, tell the user what it is needed for. Do not guess credentials, call the HTTP API directly, or attempt other workarounds.
This skill references operations in HTTP-shorthand form (e.g., GET /, GET /_cat/indices, GET /{index}/_mapping, GET /{index}/_settings/index.mode, POST /_query). The Operations table at the end of this document maps each shorthand to the equivalent elastic CLI command — always use the CLI rather than calling the HTTP API directly.
<!-- end-partial: preamble -->
Core concepts
Kibana has two alerting systems. They do not share rules, APIs, or notification wiring.
- Universal Alerting is the default for all new alerting, also called alerting v2. A rule evaluates an ES|QL query
on a schedule and opens alerts. Notifications are managed independently of rules through action policies. A policy's matcher selects alerts by their content or scopes them to specific rules through routing tags, and the policy dispatches the matched alerts to workflows (Slack, email, PagerDuty, and other connectors). A policy can be created before, after, or together with the rules it matches. Available on Kibana 9.6 or later and in Serverless Observability projects; Serverless Security and Elasticsearch projects do not offer it. Action policies and workflows require an Enterprise or trial license; rules do not.
- Classic alerting covers the classic rule types listed in
classic-rule-types.md. Its details live entirely in the
classic references — do not load them for any other task. Classic alerting has no action policies: each classic rule notifies through its own actions, which run connectors.
Universal Alerting availability
If the user states a Kibana version before 9.6, use classic alerting without the check below.
Otherwise, before the first Universal Alerting call, check it once with GET kbn:/api/alerting/v2/rules and per_page=1:
| Response | Meaning | Do | |
|---|---|---|---|
| 200 | Available | Use Universal Alerting | |
404, and GET kbn:/api/status succeeds | Not in this Kibana: a version before 9.6 (see version.number), or a Serverless Security or Elasticsearch project | Use classic alerting | |
503 with code ALERTING_DISABLED | Turned off by an administrator (alerting:v2:enabled) | Use classic alerting | |
| 403 | Available, but the user lacks the Rules feature privilege | Stop and tell the user which privilege they need; do not use classic alerting |
Any other result — another status code, a 404 followed by a failed GET kbn:/api/status, an authentication error, or no connection — says nothing about availability: stop and report the error. Do not use classic alerting.
When using classic alerting, do not ask first, and say in the final report why the rule is classic: the stated version or the meaning from the table. For a find or list request, report classic results only and say why. A request that needs an action policy or routing tag has no classic equivalent; tell the user why Universal Alerting is unavailable instead.
Process
- Identify the job. Match the request to one or more rows below. A request can combine jobs — for example a new
rule and its notifications — and they can be done in either order, because a shared routing tag links a Universal Alerting rule to its policies.
| Job | Example request | System | Read before writing | |
|---|---|---|---|---|
| Find or list | "Show me all production alerting rules" | Both systems, read-only — create, update, enable, or delete nothing | — | |
| New rule with notifications | "Alert me / page on-call when CPU is above 90% on any host" | Universal Alerting | universal-rules.md, universal-action-policies.md, universal-workflow-destinations.md | |
| New rule without notifications | "Record every time checkout latency exceeds 2 seconds" | Universal Alerting | universal-rules.md | |
| Notifications only | "Send payments alerts to Slack instead of email", "Snooze the on-call policy" | Universal Alerting — action policies; a rule changes only to add a routing tag the user agrees to | universal-action-policies.md, plus universal-workflow-destinations.md when a destination changes | |
| Edit an existing rule or change its lifecycle | "Disable rule cpu-web" | Either system, depends on where result appears | That system's references | |
| New rule of a named classic type | "Create an Elasticsearch query rule that…" | Classic | classic-rules.md, classic-rule-types.md, plus classic-actions-connectors-terraform.md for notifications | |
| Terraform for a rule | "Manage an index threshold rule with Terraform" | Route as any other request. The Terraform resource (elasticstack_kibana_alerting_rule) covers classic rules only: for Universal Alerting, tell the user and offer the API instead | classic-actions-connectors-terraform.md for a classic rule |
Reference paths are relative to references/ (see References). Never mix systems: Universal Alerting rules have no rule-level actions, and classic rules have no action policies or routing tags.
- Find what the request refers to. If the request does not identify which rules or action policies it intends — for
example "the payments rules" or "my production alerts" with no tag, name, or ID — ask the user before making any API calls; do not search rule names to guess the set. When the user refers to an existing rule by ID, name, or tag, search both systems — Universal Alerting first, then classic — and use whichever returns a match. Run both searches even when the first one matches, so a rule with the same name or tag in the other system is not missed:
| Given | Universal Alerting | Classic alerting | |
|---|---|---|---|
| ID | GET kbn:/api/alerting/v2/rules/{id} | GET kbn:/api/alerting/rule/{id} | |
| Name | GET kbn:/api/alerting/v2/rules with search=<name> | GET kbn:/api/alerting/rules/_find with search=<name>&search_fields=name | |
| Tag | GET kbn:/api/alerting/v2/rules with filter=metadata.tags:"<tag>" | GET kbn:/api/alerting/rules/_find with filter=alert.attributes.tags:"<tag>" | |
| Routing tag | GET kbn:/api/alerting/v2/rules with filter=metadata.routing_tags:"<tag>" | — (classic rules have no routing tags) |
List and find responses are paged: request the next page while the items returned so far are fewer than total.
Skip one search only when the user's wording belongs to a single system:
| User says | Search | |
|---|---|---|
| "routing tag", "action policy", "alert kind" or "signal kind", "universal rule", "v2" | Universal Alerting only | |
| A classic rule type ("index threshold rule", "Elasticsearch query rule") | Classic only | |
| "connector", "tag", "label", or a bare name or ID | Both systems |
"Snooze" and "mute" do not determine which alerting system to use: classic rules are snoozed on the rule, while Universal Alerting notifications are snoozed on action policies.
If only one system matches, use it. If both match, show both to the user and ask which they mean. If neither matches, say so — do not create a rule in its place. For a find or list request with no system named, report the results from both systems, labeled by system.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/kibana/kibana-alerting-rules/SKILL.md
Popularity
- Repository stars
- 502
- Repository forks
- 37
- 7-day trend score
- 31
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/elastic/agent-skills/kibana-alerting-rules)