Elasticsearch / Kibana Webhook
The Elasticsearch / Kibana webhook integration lets Elasticsearch / Kibana push alerts into NudgeBee. Each alert becomes a NudgeBee event that can be triaged, correlated with cluster telemetry, and used to trigger automations.
Step 1: Create the Webhook in NudgeBee
- Navigate to Admin > Integrations > Webhooks.
- Select Elasticsearch Webhook and click Add Elasticsearch Webhook Account.
- Fill in the form:
- Name of Elasticsearch / Kibana Webhook * (Required) — a descriptive name, e.g.
elasticsearch / kibana-prod. - Select Account * (Required) — the NudgeBee account that should receive these events.
- Name of Elasticsearch / Kibana Webhook * (Required) — a descriptive name, e.g.
- Click Save.
NudgeBee generates a unique webhook URL for the integration, in the same form used by the other inbound webhooks:
https://<your-nudgebee-domain>/api/webhooks/elasticsearch?token=<generated-token>
Copy the URL exactly as the integration shows it. The path segment is the provider name — lowercase, no _webhook suffix — and nothing may follow it. elasticsearch_webhook is the integration type NudgeBee stores internally, not a URL you can post to; a URL that does not match the route above is answered by the NudgeBee web app with a 404 and never reaches the alert pipeline.
- Copy the webhook URL. You will paste it into Elasticsearch / Kibana in the next step.
The token query parameter authenticates the sender. Treat the full URL as a secret — anyone holding it can create events in your tenant. If it leaks, delete the integration and create a new one to rotate the token.


Step 2: Point Elasticsearch / Kibana at the URL
Kibana has no fixed alert format: a webhook action sends exactly the body you give it. Setting this up is two parts — a connector, and an action with a JSON body on each rule.
Create the connector
In Kibana, open Stack Management > Connectors and create a Webhook connector:
- Method:
POST - URL: the NudgeBee webhook URL without the token:
https://<your-nudgebee-domain>/api/webhooks/elasticsearch - Authentication: none
- HTTP headers:
Content-Type: application/json, andAuthorizationwith valueBearer <token>(the token from Step 1). Where Kibana offers it, make theAuthorizationheader type Secret so the token is stored encrypted.
Kibana can write the webhook URL into its own logs when a delivery fails, but not its headers, so a token in a header stays out of those logs. The URL with ?token= from Step 1 also works, and existing setups that use it keep delivering.
Add the actions to each rule
On every rule whose alerts you want in NudgeBee, add the connector as an action twice.
1. When the rule fires. Set the action frequency to For each alert, run it on Query matched (or the rule type's own active action group), and paste this body:
{
"rule": {
"id": "{{rule.id}}",
"name": "{{rule.name}}",
"type": ".es-query",
"url": "{{rule.url}}"
},
"alert": {
"id": "{{alert.id}}",
"uuid": "{{alert.uuid}}",
"action_group": "{{alert.actionGroup}}"
},
"status": "firing",
"severity": "high",
"title": "{{rule.name}}",
"message": "{{context.message}}",
"value": "{{context.value}}",
"conditions": "{{context.conditions}}",
"link": "{{context.link}}",
"timestamp": "{{date}}",
"tags": "{{rule.tags}}"
}
2. When the rule recovers. Add a second action on Recovered with the same body and "status": "resolved". Without it, alerts stay open in NudgeBee.
The same body works for every rule. Only severity is yours to choose per rule.
| Field | Required | What NudgeBee does with it |
|---|---|---|
rule.name | Yes | Shown as the alert's rule, and used to find the rule in NudgeBee. |
rule.id, alert.id | Yes | Together they identify one alert. They must be identical in the firing and the recovered body, or the recovery closes nothing. |
alert.uuid | No | Kibana's id for one firing of the alert: it changes each time the alert recovers and fires again. Include it so NudgeBee can tell a new firing from a repeat of the same one. Available from Kibana 8.8. |
status | Yes | firing or resolved. If left out, a recovered action group counts as resolved. |
severity | No | critical or high, warning or medium, low, info. Defaults to low. |
title, message, value, conditions | No | Shown on the event. conditions becomes the rule's expression. |
link | No | Link back to Kibana. Kept only when it is a full URL — see the note below. |
timestamp | No | When the alert fired. Defaults to the time of arrival. |
tags | No | The rule's tags. |
rule.type | No | .es-query lists the rule as a log rule. Leave it out for other rule types. |
labels | No | An object of extra labels, for example { "namespace": "prod" }. |
Kibana only produces full URLs when server.publicBaseUrl is set in kibana.yml. Without it {{rule.url}} is empty and {{context.link}} is a path, so the event carries no link.
How the workload is found
{{alert.id}} holds the values the rule is grouped by, and NudgeBee looks each one up in the cluster inventory:
- Grouped by pod name — the alert is linked to the pod's workload and namespace.
- Grouped by container or service name — the alert is linked to the workload with that name.
- Grouped by several fields — every value is tried, so a rule grouped by container and pod is linked through the pod.
- Not grouped — there is nothing to look up. Name the workload with a label instead.
Two cases need a label:
- The same name exists in more than one namespace. Add
"labels": { "namespace": "<namespace>" }, otherwise the alert is not tied to a namespace. - You want to name the workload yourself. Add one of
pod,deployment,statefulsetordaemonsettolabels. A label naming a workload wins over the group values.
On older server releases the rule is shown by its Kibana rule ID, and a rule grouped by several fields is not linked to a workload. Upgrade to get the behavior described here.
Reference: Kibana webhook connector · Kibana rule action variables
Step 3: Verify
- Trigger a test notification from Elasticsearch / Kibana, or wait for a real alert to fire.
- In NudgeBee, open Troubleshoot > All Events. The event should appear within a few seconds.
- Open it and confirm the alert name and severity carried across, and that the impacted workload is linked where the payload identifies one.
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
| No event appears | Elasticsearch / Kibana cannot reach the NudgeBee URL | Confirm the NudgeBee endpoint is reachable from Elasticsearch / Kibana's notification sender. Check egress rules on both sides. |
HTTP 400 with webhook validation failed | The token parameter is missing or wrong | Re-copy the full URL from the integration — the token is part of the query string, and is easy to drop when pasting. |
| The rule shows as an ID instead of its name | The body carries no rule.name | Use the body from Step 2. |
| Event appears with no workload linked | The rule is not grouped by a pod, container or service name, or the name exists in more than one namespace | Group the rule by one of those fields, or add a namespace or workload label as described in Step 2. |
| Duplicate events for one alert | Two notification rules point at the same URL | Consolidate them in Elasticsearch / Kibana, or use separate integrations per environment. |
| Alerts never resolve in NudgeBee | The rule has no Recovered action, or its body uses a different rule.id or alert.id | Add the recovered action with the same body and "status": "resolved". |
| The event has no link back to Kibana | Kibana sent a path instead of a full URL | Set server.publicBaseUrl in kibana.yml. |