Kibana: Cases
|
This content was generated with the assistance of AI and should be verified against the official documentation before being relied on in production. |
Checked on 2026-11-09 against Kibana 9.5.x.
To do this by hand, follow Manage Alerts, Maintenance Windows and Cases.
An alert tells you that something crossed a line; it does not tell you who is looking at it, what they found, or whether anybody told the ticketing system. Kibana Cases is the place where an alert becomes a piece of work: a case holds the alerts that belong to one incident, the evidence the responders attach (visualizations, dashboards, files), a threaded discussion, an owner and a status, and it can push itself to an external system such as Jira or ServiceNow. This page covers how cases are created by hand and by rules, how they are structured, who may touch them and how to manage them as code. The tool-neutral side of the same problem (who is paged, how an incident is declared, how it is reviewed) is on Notifications & Incident Response and Designing Actionable Alerts; the rules that produce the alerts are on Observability Rules. The Grafana counterpart of this workflow is a Grafana Cloud capability, described on Grafana: SLOs & IRM.
Source: Cases. Cases are generally available on Elastic Cloud Serverless and on the Elastic Stack, and can be used from Observability, Elastic Security or Stack Management.
How the pieces fit
Two things are worth fixing in your head before the details. First, a case is a saved object scoped to a solution, not just to a space: Stack Management cases, Observability cases and Elastic Security cases are invisible to each other, and a case can only hold alerts created in the same solution. The Bookshelf rules of this section are Observability rules, so their cases are Observability cases. Second, a case is not synchronized in both directions with the outside world. Kibana pushes to the external system and maps fields; it never pulls updates back, and closing the ticket in Jira does not close the case in Kibana.
Where cases live and who owns them
Cases are reached through the global search (search for Cases) and, on a Stack deployment, under Observability > Cases,
Security > Cases or Stack Management > Cases. In the Cases API the solution is the owner field, with the values cases (Stack
Management), observability and securitySolution. On a Serverless project the Observability or Security project type decides
the owner.
Source: Create cases (section "Solution visibility"), Observability cases. The Observability page describes cases as the way to follow an incident from detection to resolution and mentions Jira, ServiceNow and PagerDuty as external tools; the case settings page, which is the authoritative list of connector types, is quoted below and does not include PagerDuty.
Creating a case by hand
On the Cases page, select Create case. Optionally pick a template first, which pre-fills the form. The required fields are the
name, the severity (low, medium, high or critical in the API) and the description. Optional fields are the category,
assignees, tags and additional fields. Two switches change behavior:
-
Sync alert status (on by default) keeps the status of the attached alerts in step with the status of the case.
-
Auto-extract observables (on by default) extracts observables such as IP addresses and file hashes from attached alerts. It needs a subscription feature and is available in Elastic Security (Serverless and 9.2+); it is not available for Observability cases, so ignore it for Bookshelf.
If you select a connector, the case is pushed to that external system when it is created. The Cases page itself lists counts of open, in-progress and closed cases and the average time to close; since 9.5 it offers a list view (the default) and a table view, with filters for text, status, severity, tags, categories, assignees, solution and date range. On the details page of a case, since 9.5, the title is editable in place, the Attributes section of the side panel holds assignees, severity, participants, tags and category, and the activity feed can be filtered by type and author.
Source: Create cases, Manage cases.
Attaching alerts and evidence
A case is only useful if the evidence is in it. The documented ways to attach objects are these.
| Object | How | Availability and limits |
|---|---|---|
Alerts |
From the Alerts page or the alert details, More actions on one alert and then Add to a new case or Add to existing case; for several alerts use Bulk actions. They are listed oldest to newest under Alerts on the Attachments tab. |
GA. A case holds up to 1,000 alerts, and only alerts of the same solution. |
Lens visualizations |
On a dashboard, the panel menu has Add to existing case and Add to new case. Inside a case, Visualization picks one from the library or creates one; use an absolute time range. |
Beta on the Stack. Attaching by reference (a live link, from Attach > Saved object) is Preview on the Stack since 9.5. |
Dashboards, maps and Discover sessions |
On the Activity tab, Attach > Saved object, search by title and select Attach. |
GA on the Stack since 9.5. |
Files |
Files tab, or Attach > Upload file from Activity. |
GA on the Stack since 9.5. At most 100 MiB per file (10 MiB for images) and 100 files per case; images, documents such as PDF, text, CSV and JSON, and archives are accepted, so compress Office files into a ZIP. |
Observables |
Observables tab. |
Security only; 50 per case. |
For Bookshelf the most useful attachment is the "Bookshelf service health" dashboard with its time range fixed to the incident, plus the log or trace search that shows the failing route, attached as a saved Discover session (see Data Views & Discover). Attach a dashboard rather than a screenshot: the live object keeps its filters and can be reopened by the next responder.
Source: Attach objects to cases.
Templates and the field library
A template pre-fills case fields so that every incident of a kind starts the same way. It holds an identity (name, description and tags used only in the template list), case defaults (title, description, severity, category, tags), optional custom fields, optional case settings (whether to sync alerts; extraction applies to Security only) and optionally a connector to preselect. Changing or deleting a template never changes cases that already exist. Users without the Manage templates sub-privilege can still apply enabled templates.
The location depends on the version:
-
Stack 9.5 and later, and Serverless: templates live on a dedicated Templates page in a YAML-based format (case defaults and fields on a Fields tab, settings and connector on a Configuration tab). Existing templates were migrated automatically. Custom fields come from the field library, a catalog in which a field is defined once. Global fields appear on every case; reusable fields appear only on cases created from a template that references them (or when a template is applied to an existing case, from the case actions menu with Apply template, which leaves the connector unchanged).
-
Stack 9.0 to 9.4: templates and custom fields (a label and a type, text or toggle, optionally required with a default) are managed in the case settings page.
A Bookshelf "Incident" template might set severity high, the category service-health, the tag bookshelf, a connector, and a
text field "Runbook" pointing at the runbook URL. The exact YAML field syntax (name, type, label, control) is shown in the Terraform
section below; build the template once in the UI and read its YAML back, because the page does not document a complete schema.
Source: Case templates, Configure case settings.
Case settings and external systems
The Cases > Settings page configures automatic closure, the incident management system, the field library and templates and, for Security, custom observable types.
-
Supported systems: IBM Resilient, Jira, ServiceNow ITSM, ServiceNow SecOps, Swimlane, TheHive and Webhook - Case Management (the last is the generic route to any other ticketing system with a REST API). Create the connector in Stack Management > Connectors or with Add new connector in the Incident management system list; one connector can be the default for new cases, and a case or a template can choose another.
-
Field mapping: case fields map to the external fields automatically (the case title to the ServiceNow short description and the Jira summary, tags to Jira labels, comments to ServiceNow work notes); the webhook case management connector lets you define the mapping. Depending on the field and the connector, an update overwrites or appends. Nothing is read back.
-
Automatic closure: closing the external incident does not close the case. A setting closes the Kibana case automatically when a new incident is pushed to the external system (use it when each push replaces the previous incident).
A push needs a receiver that answers like a ticketing API (the case management connectors read the created incident’s identifier
from the response), so the lab’s logging webhook receiver is not enough to exercise it; treat the push as an optional step there. The
connector concepts, including xpack.actions.allowedHosts, are on Connectors.
Source: Configure case settings.
The Cases action: opening cases from rules
Reacting to every alert by hand does not scale. A rule can carry a Cases action, which creates a case, or adds alerts to an existing one, when the rule creates alerts. It is documented as a connector, but a peculiar one: it exists only inside the rule form (you cannot create, edit or test it in Stack Management > Connectors, there is no preconfigured version, and each rule can have only one Cases action). Its properties are:
| Property | Meaning |
|---|---|
Group by alert field |
By default all alerts of the rule go to the same case. Choosing a field (for Bookshelf, |
Time window |
Alerts join an existing case only if they fall inside this window; the default is 7 days (days, weeks, hours or minutes, at least 5 minutes). |
Template name |
Applies a case template when the action fires. |
Auto-push case to connected external system |
Pushes the new case to the template’s external system. GA since 9.4. |
Maximum amount of cases to open |
Caps the number of cases one run can create. GA since 9.4; the Kibana source gives a default of 5 and an absolute ceiling of 1,000 per run. |
Reopen when the case is closed |
A new alert reopens a closed case that matches the grouping and the window, instead of opening a second one. |
The user who saves the rule needs all on Cases in addition to the privileges for the rule type (the page says the exact case
features depend on the rule type and on role visibility). Through the rule API the action is a system action: its connector id is the
fixed string system-connector-.cases, the type is .cases and the parameters are nested under subActionParams. The documented API
example (from an Attack Discovery schedule) shows timeWindow, reopenClosedCases, groupingBy and templateId; the connector’s
parameter schema in the Kibana source adds autoPushCase, maximumCasesToOpen and owner. For an Observability rule it looks like
this (a fragment of the actions array, to add to a rule such as those on
Alerting APIs & Terraform, which carry no Cases action):
{
"id": "system-connector-.cases",
"action_type_id": ".cases",
"uuid": "bookshelf-5xx-case",
"params": {
"subAction": "run",
"subActionParams": {
"owner": "observability",
"groupingBy": ["service.name"],
"timeWindow": "7d",
"reopenClosedCases": true,
"templateId": null,
"autoPushCase": false,
"maximumCasesToOpen": 5
}
}
}
The right design for cases is to open them from the rules that page a human, not from every rule: a case per firing of a noisy warning rule only recreates the noise in another place. Group by the field that identifies the thing that is broken, keep the time window at least as long as the longest incident you expect, and turn on Reopen so a flapping alert does not produce a new case every night. See Alert Lifecycle, Snooze & Maintenance Windows for how flapping and snoozing decide whether alerts are created at all.
Source: Cases connector and the Kibana source file cases/server/connectors/cases/schema.ts for the parameters not in the page; the system action id is from the Create a rule API page examples.
Privileges, notifications and case data
Cases privileges are set per solution in the role, as None, Read or All. Customize sub-feature privileges adds finer grants: Delete (cases and comments), Case settings, Create comments & attachments, Re-open, Assign users and Manage templates (templates and the field library, GA on the Stack since 9.5). The minimum privileges by task are:
| Task | Needs |
|---|---|
View cases |
Cases |
Create and manage cases |
Cases |
Be assigned to a case |
Cases |
Push a case to an external system, manage connectors |
Cases |
Add alerts to cases |
Cases |
Report on case data |
Elasticsearch |
For the Bookshelf space the bookshelf-sre role of
Spaces, Roles & Privileges already uses base all and
covers all of this; a more careful role would grant Cases read to the viewers and all only to responders.
Email notifications tell a user that they were assigned to a case. On Elastic Cloud nothing needs configuring except adding the
recipient domains to the notifications domain allowlist, because the preconfigured Elastic-Cloud-SMTP connector is used. On a
self-managed stack, create a preconfigured email connector in kibana.yml, set notifications.connectors.default.email to its name,
and optionally set server.publicBaseUrl so that the email links to the case. The lab has no mail server, so assignment emails are
out of scope there.
Case data as data. Cases are also indexed into three analytics indices: .cases (state), .cases-activity (history) and
.cases-attachments (attached items). They are GA on the Stack since 9.5 (preview from 9.2 to 9.4), and by default only privileged
users can read them; give a reporting role Elasticsearch read and view_index_metadata with allow_restricted_indices set to true.
Such a role sees cases of all spaces and solutions, so filter by space_id and owner in every query and visualization. A
dashboard of "time to close" and "cases per service" built on these indices is the natural incident-review companion to the
service health dashboard.
Analyzing a case with AI. Since 9.5 (and on Serverless) a case can be sent to an Agent Builder chat with Add to chat or Summarize
case; it needs an Enterprise subscription and the setting xpack.cases.chat.enabled, which is off by default.
Source: Control access to cases, Create cases (email notifications), Analyze cases with AI.
Cases as code: API and Terraform
The Cases API has endpoints to create, update, find and delete cases, add comments and files, attach alerts, push a case to a connector, read the user-action history, and to read and write the case configuration and templates. A minimal case for a Bookshelf incident, without an external connector:
curl -s -X POST "http://localhost:5601/s/bookshelf/api/cases" \
-u "alice:change-me-lab-only" \
-H "kbn-xsrf: true" -H "Content-Type: application/json" \
-d '{
"owner": "observability",
"title": "Bookshelf: 5xx ratio above 5 percent",
"description": "Opened by hand while testing the incident workflow.",
"severity": "high",
"tags": ["bookshelf", "lab"],
"connector": { "id": "none", "name": "none", "type": ".none", "fields": null },
"settings": { "syncAlerts": true }
}'
The body requires owner, title, description, tags, connector, settings.syncAlerts; severity, category, assignees (by
user profile uid) and customFields are optional, and a template object (an id from GET /api/cases/templates) applies a
template on the server when the setting xpack.cases.templates.enabled is on. A case created through the API has observable
extraction off unless extractObservables is true.
For Terraform, the elastic/elasticstack provider documents elasticstack_kibana_case_template on its main branch, but the latest
release (0.16.6) does not contain it: terraform validate against 0.16.6 answers "does not support resource type", so treat the
HCL below as Planned until a provider release ships it. The resource needs Stack 9.5.2 or later; the
underlying templates API is marked Technical Preview in the Kibana OpenAPI specification and is gated by
xpack.cases.templates.enabled, which defaults to true. The same applies to elasticstack_kibana_case_field_definition for the field library
(referencing library fields by $ref from a template needs Stack 9.6.0 or later, which is not released at the time of writing;
treat it as Planned). The template body is YAML inside the resource:
resource "elasticstack_kibana_case_template" "bookshelf_incident" {
space_id = "bookshelf"
owner = "observability"
name = "bookshelf-incident"
description = "Defaults for Bookshelf service incidents."
tags = ["bookshelf"]
definition_yaml = <<-EOT
name: Bookshelf incident
severity: high
category: service-health
tags:
- bookshelf
settings:
syncAlerts: true
fields:
- name: runbook
type: keyword
label: Runbook
control: INPUT_TEXT
EOT
}
Every update creates a new template version, and destroying the resource soft-deletes all versions; cases already created are
unaffected. The Cases connector on a rule is part of the rule definition, so it is managed with the rule resource (see
Alerting APIs & Terraform). Cases can also be exported
and imported as .ndjson from Saved Objects (with Include related objects to carry connectors), but files, alerts and
Timelines are not exported and must be re-attached after import.
Reference: Kibana API: Cases (create-case body per the Kibana 9.5 OpenAPI specification), kibana_case_template, kibana_case_field_definition.
What can go wrong
-
The alert cannot be attached. The case and the alert belong to different solutions (an Observability alert cannot join a Stack Management case), or the user lacks alert access for the solution.
-
Cases pile up. The Cases action without grouping puts everything in one case until the window ends, and with a too narrow window or a wrong grouping field it creates a case per alert. Check the grouping field is one that exists in the alert.
-
The case did not reach Jira or ServiceNow. The connector is missing from the template or the case, the user lacks Actions and Connectors
all, or the connector’s credentials need re-authentication after an import (Go to connectors). -
The external ticket was closed but the case stays open. Cases are not updated from the outside; use the automatic closure setting or close it by hand.
-
Nobody is assigned. Users appear as assignees only after they logged in once, and need Cases
all. -
Cases are missing in a report. Case data lives in restricted indices that need the explicit role described above, and rows from all spaces appear unless you filter.
-
Dashboards cannot be attached. On a 9.0 to 9.4 stack attaching dashboards, maps and Discover sessions is not available; it is GA since 9.5.
Hands-on: the Bookshelf incident workflow
-
In the space
bookshelfopen Observability > Cases > Settings and review the incident management system list; leave it on No connector unless you have a ticketing system to push to (see Connectors). -
Create the template "Bookshelf incident" (9.5: Templates page; earlier: case settings) with severity
highand the tagbookshelf. -
Edit the 5xx ratio rule (threshold 0.05 over 5 minutes) and add a Cases action grouped by
service.name, with the template and Reopen on (turn Auto-push on only if you configured a connector). Keep the existing webhook action; the case is an addition, not a replacement. -
Switch the load generator to failing-request mode. When the rule fires, open Cases and check that one case exists, and that the alert is under Attachments; the existing webhook action still posts to the receiver as before.
-
In the case, attach the "Bookshelf service health" dashboard from Attach > Saved object (9.5), add a comment and assign yourself.
-
Return to normal traffic, let the alert recover, close the case and check the activity feed. Trigger the rule again inside the window and confirm it reopens the same case instead of creating a second one.
In the books
None of the books in the reference list covers Kibana Cases. The incident-management workflow in general (declaring, collaborating, reviewing) is treated in Hausenblas, Cloud Observability in Action, chapter 7, and in Chapman and Holmes, Observability with Grafana, chapter 9, from the Grafana side; the Kibana model on this page (solution-scoped cases, the Cases action with grouping and a time window, a templates page and field library) is entirely newer than those editions. Publisher pages are listed in the bibliography of the section index.