Skip to content
Chapter 07Kibana integration

Connect Kibana alerts to your on-call team

Prepare your workspace, configure separate firing and recovery actions, and verify the full response cycle.

15 min read

Kibana evaluates the rule and sends a webhook. Comtinel validates it, selects a response team and policy, and tracks the incident. Kibana rule actions run separately from Comtinel's scheduled Elasticsearch queries. This webhook connection does not require an Elasticsearch password or API key.

Check your Elastic installation

Starting without Elastic? A separate Elastic Cloud Hosted deployment on AWS is a practical first lab: it includes Elasticsearch and Kibana with managed operations. Confirm the region, subscription and Webhook entitlement before provisioning. If the infrastructure must run in your own AWS account, use a separate self-managed lab and plan its TLS, storage, snapshots and upgrades. A single-node test setup is not a production availability design.

Record your exact Kibana version, deployment type, subscription, space and rule type. This guide uses the per-alert variables documented in Kibana 8.19 and current Elastic documentation. Test the connector and recovery action on your own version before enabling production rules.

Confirm a licensed Webhook connector is available, your user can manage connectors and rules in the correct space, and the rule supports per-alert firing and recovery actions. Self-managed Basic should not be assumed to include external webhook actions. Cloud and Serverless entitlements depend on the product and plan. Check your deployment's connector availability and the Elastic subscription matrix.

Summary actions expose arrays and different variables. Watcher, Security detection notifications without matching recovery, and Webhook – Case Management are different contracts. They are not accepted automatically. If your rule cannot supply a stable episode identity on both actions, complete the mapping with your Elastic administrator before activation.

1. Prepare Comtinel

  1. 1

    Prepare the responders

    Create users, a team, a schedule covering the test period, and an escalation policy with the intended notification channels. Verify an on-call responder is available.

  2. 2

    Create a Kibana routing rule

    Select source Kibana, rule name ComtinelKibanaTestAlert for the panel test, and your test team and policy. Use a different route matching your real Kibana rule for the end-to-end test. Label matchers can select kibana.deployment_id, kibana.space_id, kibana.rule_id or a service label. Use the simulator with normalized labels and mapped severity.

  3. 3

    Register the deployments

    Open System → Kibana integration. Choose a permanent deployment ID for each independent Elastic installation, such as production-eu. Enter the IDs, enable the integration and save. Leave Allowed severities empty until you have agreed a severity convention. A blank list accepts missing severity; it does not promote it to critical.

  4. 4

    Generate the credential

    Copy the displayed endpoint and generate the Kibana secret. Copy it securely while it is shown. The endpoint and credential belong to this workspace and source. All registered deployments in this workspace share the credential; use separate workspaces for installations that should not trust each other.

Deployment, space, rule and alert IDs separate independent alert instances. The episode ID separates successive firing periods. Keep these values stable through recovery. Changing a rule's display name or severity does not create a new identity.

2. Configure a Webhook connector

In Kibana, open Stack Management → Connectors, or add a connector from the rule action editor. Choose Webhook.

MethodPOST
URLThe complete HTTPS endpoint copied from Comtinel
AuthenticationNone; set the Bearer credential through a custom header
Content-Type headerapplication/json
Authorization headerBearer YOUR_COMTINEL_KIBANA_SECRET

Use a secret header where supported by your version. Older versions may store custom headers as configuration visible to connector administrators. Do not use a Kibana API key, Basic credentials or a token in the URL. Protect connector access and use full TLS certificate validation.

For self-managed Kibana, verify xpack.actions.allowedHosts, proxy/TLS settings and the encrypted saved objects key. Cloud settings and preconfigured connector availability differ. If the endpoint returns an access error after you verify the credential, contact Comtinel to check workspace webhook access. See Elastic's connector instructions.

3. Add firing and recovery actions

Use action frequency For each alert. Add one action for the rule's active action group and one for its recovery group. The group names differ by rule type; the JSON body must contain literal firing or resolved. Select the same connector for both.

Firing body — replace the deployment ID

{
  "version": "1",
  "deploymentId": "production-eu",
  "spaceId": "{{rule.spaceId}}",
  "ruleId": "{{rule.id}}",
  "ruleName": "{{rule.name}}",
  "alertId": "{{alert.id}}",
  "episodeId": "{{alert.uuid}}",
  "status": "firing",
  "summary": "{{rule.name}}",
  "ruleUrl": "{{rule.url}}",
  "labels": {}
}

For recovery, copy the same body and change only status to resolved. The panel provides both complete bodies, including saved field mappings. Verify alert.uuid is present on both actions and changes for a new firing period. alert.id alone is insufficient. Never use the action execution date as the episode ID: it changes on repeat and recovery.

Use double-brace Mustache variables inside JSON strings so the webhook connector escapes them. The template intentionally avoids rendering arrays, raw context objects and triple-brace substitutions. Check the variable picker for your rule type; context properties and recovery availability vary. rule.url may be empty if the public Kibana URL is unset.

If stable UUIDs are unavailable but a stable start timestamp is available on both actions, send that identical canonical timestamp as episodeId. Verify a new start value on refire. Otherwise this rule requires a separate adapter and is outside this release.

4. Map your fields and links

Required v1 fields are version (string 1), deploymentId, spaceId, ruleId, ruleName, alertId, episodeId and status. Optional fields are severity, summary, description, labels, ruleUrl, discoverUrl, runbookUrl and startedAt.

Add labels as a JSON object with string values, for example {"service":"checkout","env":"production"}. Comtinel sets the reserved Kibana identity labels and alert name itself. Map your severity vocabulary using a saved map such as {"page":"critical","warn":"warning"}. Firing filters apply after this mapping. Recovery bypasses the severity filter.

For existing custom bodies, map canonical names to JSON pointers, for example {"ruleId":"/rule/id","episodeId":"/alert/uuid"}. Dotted field names are literal: /kibana.alert.uuid reads that top-level key. Escape slash with ~1 and tilde with ~0. The mapping does not run code, query Elasticsearch or infer missing identity. One saved mapping applies to all deployments in the workspace.

For Discover, copy a working saved Discover link from your Kibana space into discoverUrl, or use a link variable documented for your rule type. No Discover URL is guessed from index or data-view names. Rule, Discover and runbook links accept HTTP(S) only, are never fetched by Comtinel, and still require the user's Elastic permissions.

Limits: one alert per request, 256 KiB request, 64 KiB normalized input metadata, 192 KiB queued event, 50 deployment IDs, 512-character identity fields and 2048-character URLs. Summary batches and unknown status/version values fail validation. Missing or unresolved identity variables are rejected.

5. Verify the response cycle

  1. 1

    Validate without notifications

    Paste a rendered sample into Validate a rendered payload in Comtinel. Check both firing and recovery samples. This checks saved mapping, schema and severity filters without queuing an incident. It can run while ingestion is disabled.

  2. 2

    Rehearse Comtinel routing

    Use Send test alert with an allowed severity. It may notify real responders. Check the team, policy and device receipt; accept the incident, retry the same test and confirm no new incident or calls. Then Resolve test. Keep the pending identity after a timeout and retry or recover it before starting another. Panel tests bypass public authentication and Kibana networking.

  3. 3

    Test the connector

    From Kibana, send a rendered literal body with controlled test IDs. Confirm HTTP acceptance and the Comtinel incident. A connector test does not evaluate a rule or automatically recover; send a matching resolved body or manually close this synthetic incident.

  4. 4

    Exercise a real rule

    Choose a reversible test condition supported by your rule and data source. Fire the rule; confirm the incident, source, deployment, space, links, team and policy. Verify actual notifications on the responder's device. ACK, observe a repeat without another paging cycle, then clear the condition and verify automatic resolution without pressing Mark resolved.

  5. 5

    Refire and clean up

    Trigger a new firing period. Confirm a new episode and incident, then recover it. Record version, deployment, license, rule type, sanitized bodies, incident IDs and observed delivery. Pause or remove temporary rules after recovery and rotate temporary credentials if required. Repeat for each installation and rule type.

ACK stops Comtinel escalation; it does not mute, acknowledge or modify the Kibana rule. Manual resolution does not reset an episode: repeats with the same episode ID stay closed. An early recovery prevents a late firing from opening that episode. An older recovery cannot close a newer episode.

Troubleshoot delivery and recovery

401: wrong workspace/source secret or no configured credential. 403: disabled integration, origin or WAF restriction. 400/413: inspect required fields, JSON pointers, rendered variables and size. 202: queued, duplicate or deliberately filtered; it does not prove an incident or notification. 503: retry the exact payload and episode after enqueue failure or contention.

An unrouted incident needs a matching Kibana route and valid team/policy. A stuck incident usually needs a recovery action with the same deployment, space, rule, alert and episode values. After secret/settings changes, allow up to 60 seconds for cached receivers. Keep ingestion enabled until open alerts have recovered.

Before enabling production alerts, verify one complete firing, acknowledgement and recovery cycle from your real Kibana rule. Keep the integration enabled until open alerts have recovered. Contact Comtinel with the response code and a redacted example if valid deliveries still fail.