Agent skill

Kibana Alerting Rules

by aspectrr in aspectrr/deer

Create and manage Kibana alerting rules via REST API or Terraform.

MITAuto-check passedDevOps & Cloud

Install Kibana Alerting Rules

skills CLI
$ npx skills add aspectrr/deer --skill kibana-alerting-rules -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aspectrr/deer kibana-alerting-rules --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aspectrr/deer.git skills-src && mkdir -p .claude/skills && cp -r skills-src/deer-cli/internal/skill/defaults/kibana-alerting-rules .claude/skills/kibana-alerting-rules && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
kibana-alerting-rules
GitHub stars
405
Token cost
~1.8k tokens
SKILL.md length
436 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
MIT

At a glance

Create and manage Kibana alerting rules via REST API or Terraform.

  • Works in 6 steps: Set action frequency per action, not per… → Use alert summaries to reduce… → Always add a recovery action. Rules… → …
  • Managing rule lifecycle (enable
  • SKILL.md covers Core Concepts, Authentication, API Reference and Creating a Rule, plus 6 more sections
  • Calls curl

What it does

Kibana Alerting Rules is an agent skill from aspectrr/deer. Create and manage Kibana alerting rules via REST API or Terraform. Use when creating, updating, or managing rule lifecycle (enable, disable, mute, snooze) or rules-as-code workflows.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Infrastructure as code and REST APIs. It works with Elasticsearch and Terraform. The repository describes itself as: 🦌 The AI Elasticsearch Engineer. The licence is MIT.

When your agent uses it

  • Managing rule lifecycle (enable
  • Rules-as-code workflows

Example prompts

  • “/kibana-alerting-rules”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Set action frequency per action, not per rule. The notify_when field at the rule level is deprecated in favor
  2. Use alert summaries to reduce notification noise. Configure actions to send periodic summaries.
  3. Always add a recovery action. Rules without a recovery action leave incidents open in PagerDuty, Jira, and
  4. Set a reasonable check interval. The minimum recommended interval is 1m.
  5. Use alert_delay to suppress transient spikes. Setting {"active": 3} means the alert only fires after 3
  6. Tag rules consistently. Use tags like production, staging, team-platform for filtering.

What it can do on your machine

Read from SKILL.md and the folder at commit e4f9845. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use curl, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Kibana Alerting Rules loads about 1.8k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 436 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aspectrr/deer at commit e4f9845, republished under its MIT licence (© aspectrr). 436 words, ~1,837 tokens.

Download SKILL.mdSave it as .claude/skills/kibana-alerting-rules/SKILL.md (or your agent's skills folder).
name
kibana-alerting-rules
description
Create and manage Kibana alerting rules via REST API or Terraform. Use when creating, updating, or managing rule lifecycle (enable, disable, mute, snooze) or rules-as-code workflows.
metadata.author
elastic
metadata.version
0.1.0
metadata.source
elastic/agent-skills//skills/kibana/kibana-alerting-rules

Kibana Alerting Rules

Core Concepts

A rule has three parts: conditions (what to detect), schedule (how often to check), and actions (what happens when conditions are met). When conditions are met, the rule creates alerts, which trigger actions via connectors.

Authentication

All alerting API calls require either API key auth or Basic auth. Every mutating request must include the kbn-xsrf header.

http
kbn-xsrf: true

API Reference

Base path: <kibana_url>/api/alerting (or /s/<space_id>/api/alerting for non-default spaces).

OperationMethodEndpoint
Create rulePOST/api/alerting/rule/{id}
Update rulePUT/api/alerting/rule/{id}
Get ruleGET/api/alerting/rule/{id}
Delete ruleDELETE/api/alerting/rule/{id}
Find rulesGET/api/alerting/rules/_find
List rule typesGET/api/alerting/rule_types
Enable rulePOST/api/alerting/rule/{id}/_enable
Disable rulePOST/api/alerting/rule/{id}/_disable
Mute all alertsPOST/api/alerting/rule/{id}/_mute_all
Unmute all alertsPOST/api/alerting/rule/{id}/_unmute_all

Creating a Rule

Required Fields
FieldTypeDescription
namestringDisplay name (does not need to be unique)
rule_type_idstringThe rule type (e.g., .es-query, .index-threshold)
consumerstringOwning app: alerts, apm, discover, infrastructure, logs, metrics, ml, monitoring, securitySolution, siem, stackAlerts, uptime
paramsobjectRule-type-specific parameters
scheduleobjectCheck interval, e.g., {"interval": "5m"}
Example: Create an Elasticsearch Query Rule
bash
curl -X POST "https://my-kibana:5601/api/alerting/rule/my-rule-id" \
  -H "kbn-xsrf: true" \
  -H "Content-Type: application/json" \
  -H "Authorization: ApiKey <your-api-key>" \
  -d '{
    "name": "High error rate",
    "rule_type_id": ".es-query",
    "consumer": "stackAlerts",
    "schedule": { "interval": "5m" },
    "params": {
      "index": ["logs-*"],
      "timeField": "@timestamp",
      "esQuery": "{\"query\":{\"match\":{\"log.level\":\"error\"}}}",
      "threshold": [100],
      "thresholdComparator": ">",
      "timeWindowSize": 5,
      "timeWindowUnit": "m",
      "size": 100
    },
    "actions": [
      {
        "id": "my-slack-connector-id",
        "group": "query matched",
        "params": {
          "message": "Alert: {{rule.name}} - {{context.hits}} hits detected"
        }
      }
    ],
    "tags": ["production", "errors"]
  }'

Finding Rules

bash
curl -X GET "https://my-kibana:5601/api/alerting/rules/_find?per_page=20&page=1&search=cpu&sort_field=name&sort_order=asc" \
  -H "Authorization: ApiKey <your-api-key>"

Lifecycle Operations

bash
curl -X POST ".../api/alerting/rule/{id}/_enable" -H "kbn-xsrf: true"
curl -X POST ".../api/alerting/rule/{id}/_disable" -H "kbn-xsrf: true"
curl -X POST ".../api/alerting/rule/{id}/_mute_all" -H "kbn-xsrf: true"
curl -X DELETE ".../api/alerting/rule/{id}" -H "kbn-xsrf: true"

Terraform Provider

hcl
resource "elasticstack_kibana_alerting_rule" "cpu_alert" {
  name         = "CPU usage critical"
  consumer     = "stackAlerts"
  rule_type_id = ".index-threshold"
  interval     = "1m"
  enabled      = true

  params = jsonencode({
    index              = ["metrics-*"]
    timeField          = "@timestamp"
    aggType            = "avg"
    aggField           = "system.cpu.total.pct"
    groupBy            = "top"
    termField          = "host.name"
    termSize           = 10
    threshold          = [0.9]
    thresholdComparator = ">"
    timeWindowSize     = 5
    timeWindowUnit     = "m"
  })

  tags = ["infrastructure", "production"]
}

Best Practices

  1. Set action frequency per action, not per rule. The notify_when field at the rule level is deprecated in favor of per-action frequency objects.
  2. Use alert summaries to reduce notification noise. Configure actions to send periodic summaries.
  3. Always add a recovery action. Rules without a recovery action leave incidents open in PagerDuty, Jira, and ServiceNow indefinitely.
  4. Set a reasonable check interval. The minimum recommended interval is 1m.
  5. Use alert_delay to suppress transient spikes. Setting {"active": 3} means the alert only fires after 3 consecutive runs match the condition.
  6. Tag rules consistently. Use tags like production, staging, team-platform for filtering.
Show full SKILL.md (148 more words)Show less

Common Pitfalls

  1. Missing kbn-xsrf header. All POST, PUT, DELETE requests require kbn-xsrf: true.
  2. Wrong consumer value. Check the rule type's supported consumers via GET /api/alerting/rule_types.
  3. Immutable fields on update. rule_type_id and consumer cannot be changed with PUT.
  4. Rule-level notify_when is deprecated. Always use frequency inside each action object.
  5. API key ownership. Rules run using the API key of the user who created them. If that user's permissions change, the rule may fail silently.

Guidelines

  • Include kbn-xsrf: true on every POST, PUT, and DELETE.
  • Set frequency inside each action object — rule-level notify_when and throttle are deprecated.
  • rule_type_id and consumer are immutable after creation; delete and recreate the rule to change them.
  • Prefix paths with /s/<space_id>/api/alerting/ for non-default Kibana Spaces.
  • Always pair an active action with a Recovered action to auto-close incidents.
  • Run GET /api/alerting/rule_types first to discover valid consumer values and action group names.

© aspectrr, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in deer-cli/internal/skill/defaults/kibana-alerting-rules of aspectrr/deer.

Open the folder on GitHubat commit e4f9845

Compare with similar skills

Kibana Alerting Rules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Kibana Alerting Rules compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Kibana Alerting Rules this skillaspectrr/deer405—~1.8kAutomated safety check: PassMIT
Neo4j Aura Provisioning Skillneo4j-contrib/neo4j-skills114—~3.7kAutomated safety check: NotesMIT
Existing Entity Requirementselastic/terraform-provider-elasticstack210—~1.1kAutomated safety check: PassApache-2.0
New Entity Requirementselastic/terraform-provider-elasticstack210—~1.9kAutomated safety check: PassApache-2.0
Castai Install Authjeremylongshore/tons-of-skills-marketplace2.8k—~1.2kAutomated safety check: PassMIT
Google Cloud Storage Bucket Architectgoogle/skills21k—~2.6kAutomated safety check: PassApache-2.0

Similar skills

  • Neo4j Aura Provisioning Skill

    neo4j-contrib/neo4j-skills

    Provisions and manages Neo4j Aura instances via CLI (aura-cli v1.7+) or REST API.

    114 GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Existing Entity Requirements

    elastic/terraform-provider-elasticstack

    Official

    Examines an existing Terraform resource or data source implementation and produces an OpenSpec requirements document under openspec/specs/.

    210 GitHub stars~1.1k tokensUpdated today
    DevOps & CloudAuto-check passed
  • New Entity Requirements

    elastic/terraform-provider-elasticstack

    Official

    Gathers initial requirements for a new Terraform resource or data source by examining API clients (go-elasticsearch, generated kbapi), Elastic API docs (Elastic docs MCP server and/or web), then…

    210 GitHub stars~1.9k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Castai Install Auth

    jeremylongshore/tons-of-skills-marketplace

    Choose and configure the correct CAST AI authentication boundary for castctl, REST API, Terraform, or enterprise child-organization access.

    2.8k GitHub stars~1.2k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Creates Cloud Storage on Google Cloud (also known colloquially as GCS) buckets.

    21k GitHub stars~2.6k tokensUpdated today
    Backend & APIsAuto-check passed
  • Datadog Data Source Generator

    DataDog/terraform-provider-datadog

    Official

    Generates a Datadog Terraform provider data source from an OpenAPI operation with tfgen and opens a review-ready GitHub PR with a risk scan and testing guide.

    468 GitHub stars~2.7k tokensUpdated today
    DevOps & CloudAuto-check passed

More from aspectrr/deer

All 14 skills in this repo
  • Elasticsearch Audit

    aspectrr/deer

    Enable, configure, and query Elasticsearch security audit logs.

    405 GitHub stars~1.7k tokensUpdated 5 mo ago
    Auto-check passed
  • Elasticsearch Authn

    aspectrr/deer

    Authenticate to Elasticsearch using native, file-based, LDAP/AD, SAML, OIDC, Kerberos, JWT, or certificate realms.

    405 GitHub stars~1.2k tokensUpdated 5 mo ago
    Auto-check: notes
  • Elasticsearch Authz

    aspectrr/deer

    Manage Elasticsearch RBAC: native users, roles, role mappings, document- and field-level security.

    405 GitHub stars~1.8k tokensUpdated 5 mo ago
    Auto-check passed
  • Ingest and transform data files (CSV/JSON/Parquet/Arrow IPC) into Elasticsearch with stream processing and custom transforms.

    405 GitHub stars~684 tokensUpdated 5 mo ago
    Auto-check passed
  • Diagnose and resolve Elasticsearch security errors: 401/403 failures, TLS problems, expired API keys, role mapping mismatches, and Kibana login issues.

    405 GitHub stars~4.9k tokensUpdated 5 mo ago
    Auto-check passed
  • Kafka

    aspectrr/deer

    Kafka topic management, consumer group monitoring, message production/consumption, and cluster health diagnostics.

    405 GitHub stars~946 tokensUpdated 5 mo ago
    Auto-check passed

Questions about Kibana Alerting Rules

What does Kibana Alerting Rules do?

Create and manage Kibana alerting rules via REST API or Terraform. Kibana Alerting Rules is an agent skill from aspectrr/deer. Create and manage Kibana alerting rules via REST API or Terraform.

When should I use Kibana Alerting Rules?

Kibana Alerting Rules fits situations like: managing rule lifecycle (enable; rules-as-code workflows.

How do I install Kibana Alerting Rules in Claude Code?

Run `npx skills add aspectrr/deer --skill kibana-alerting-rules -a claude-code`. Or copy the skill folder (deer-cli/internal/skill/defaults/kibana-alerting-rules in aspectrr/deer) into .claude/skills/kibana-alerting-rules in your project. Claude Code loads it when a task matches its description.

How do I install Kibana Alerting Rules in Codex?

Run `npx skills add aspectrr/deer --skill kibana-alerting-rules -a codex`. Or copy the skill folder (deer-cli/internal/skill/defaults/kibana-alerting-rules in aspectrr/deer) into .agents/skills/kibana-alerting-rules in your project. Codex loads it when a task matches its description.

Can I use Kibana Alerting Rules in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aspectrr/deer --skill kibana-alerting-rules -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/kibana-alerting-rules, .gemini/skills/kibana-alerting-rules, .github/skills/kibana-alerting-rules and .opencode/skills/kibana-alerting-rules in your project.

What does Kibana Alerting Rules need to run?

Going by SKILL.md and its folder, Kibana Alerting Rules needs the command-line tools its instructions call (curl).

Does Kibana Alerting Rules access the network?

SKILL.md contains no URLs. Its commands use curl, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Kibana Alerting Rules safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Kibana Alerting Rules use?

Kibana Alerting Rules is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Kibana Alerting Rules use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Kibana Alerting Rules?

Skills that share tags, products or a category with Kibana Alerting Rules: Neo4j Aura Provisioning Skill (neo4j-contrib/neo4j-skills, 114 stars), Existing Entity Requirements (elastic/terraform-provider-elasticstack, 210 stars), New Entity Requirements (elastic/terraform-provider-elasticstack, 210 stars) and Castai Install Auth (jeremylongshore/tons-of-skills-marketplace, 2.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Kibana Alerting Rules?

aspectrr (a GitHub user) maintains it in aspectrr/deer, which has 405 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on April 21, 2026.

Source: aspectrr/deer on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.