In Flashduty On-call
You can get the integration push URL in either of the following ways.Use a dedicated integration
Choose this option if all alerts go to one channel. It’s the simpler setup.View dedicated integration setup steps
View dedicated integration setup steps
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add integration
- Select Elastic, then click Save
- Open the generated integration card and copy the Push URL
Use a shared integration
Choose this option if you need to route alerts to different channels based on the alert payload.Prerequisites
- Subscription: the Kibana Webhook and PagerDuty connectors require an Elastic Gold subscription or higher (Basic does not include them); a 30-day trial license also works. See Elastic subscriptions.
- Network: Kibana must be able to reach the Flashduty push URL. If your self-managed Kibana sets
xpack.actions.allowedHostsinkibana.yml, add the push URL’s host name (for exampleapi.flashcat.cloud) to that list, otherwise the connector refuses to send. - Permissions: you need Kibana privileges to create connectors and edit rules. See Alerting security.
In Kibana
1
Create a Webhook connector
Where: Kibana › Stack Management › Connectors › Create connector › Webhook (on some 8.x versions: Stack Management › Alerts and Insights › Connectors)
Click Save.
2
Add an action to the rule
Where: Kibana › edit or create a rule › Actions › select the
Flashduty connector3
Add a second action for Recovered
Where: Kibana › edit or create a rule › Actions › Add action
Some rules have several alert action groups, for example
Alert and Warning on a Metric threshold rule, or Critical, High, Medium, and Low on an SLO burn rate rule. Add one action per action group and set the matching severity in its template.4
Verify the lifecycle
Where: Kibana › Stack Management › ConnectorsLet the rule match its condition, and confirm that Flashduty receives an active alert. Then let the data return to normal, and confirm that the same alert recovers. A few seconds later the integration in Flashduty shows a Latest event time, which means setup works.The connector’s Test tab sends the body you type without rendering rule or alert variables. It only proves that the push URL is reachable. If you paste the template below into Test, Flashduty receives the literal
{{rule.id}} and {{alert.id}} and opens an active alert titled {{rule.name}}; change action_group in the body to recovered and click Run again to recover that test alert.Action template
Paste the following JSON into the Body of every action:
Kibana JSON-escapes variables in the Body, so quotes or line breaks in rule names or descriptions do not break the JSON.
Custom labels
To turn fields from the rule context into Flashduty labels (for routing or noise reduction), add acustom_labels object to the template, for example:
Alert key
Flashduty builds the Alert Key fromrule_id and alert_id.
rule.iduniquely identifies the rule.alert.idis the ID of a single alert produced by the rule. For rules grouped by a field it is the group value (such as a host name); for ungrouped rules it is usually a fixed value (such as*). It does not change while an alert goes from active to Recovered.- Kibana’s own PagerDuty connector uses
<rule ID>:<alert ID>as its default dedup key to tie an alert’s trigger and resolve together, the same pairing this integration uses.
alert.uuid stays the same while an alert is active, and a new UUID is generated when the same alert.id fires again after recovering. Flashduty stores it only as the alert_uuid label so you can find that occurrence in Kibana. After a Flashduty alert recovers, the next trigger with the same Alert Key opens a new alert, so keying on alert.id also gives one Flashduty alert per occurrence.
Changes to the rule name, tags, severity, description, or action group do not change the Alert Key. For example, when a Metric threshold rule’s group moves from Warning to Alert, both notifications carry the same Alert Key.
Status and severity
severity is case-insensitive. Any other value is rejected so that a typo cannot produce the wrong severity.
Security detection rules do not send Recovered notifications. Each detection alert becomes a separate Flashduty alert that you close manually or through auto-close in Flashduty.
Use the PagerDuty connector (optional)
If your rules already use the Kibana PagerDuty connector, you can point it at the Flashduty PagerDuty Compatible integration without rewriting the actions. Alerts sent this way arrive through Flashduty’s PagerDuty Compatible integration, not the Elastic integration on this page.- Add a PagerDuty Compatible integration in Flashduty and copy its push URL
- Create a PagerDuty connector in Kibana: set API URL to that push URL (that is,
{integration_url}) and Integration Key to the integration key from the push URL - In the rule, use For each alert. Add an action with Event action
Triggerfor the alert action group, and one with Event actionResolvefor Recovered. The Recovered action defaults toResolve - Keep the DedupKey that Kibana pre-fills,
{{rule.id}}:{{alert.id}}, on both actions and do not clear it, so the resolve event closes the matching alert. With an empty DedupKey on the Trigger action, Kibana sends nodedup_key, Flashduty generates a random Alert Key for each trigger, and the resolve event cannot close it
Troubleshooting
- Kibana reports
target url "..." is not added to the Kibana config xpack.actions.allowedHosts: add the Flashduty push URL’s host name toxpack.actions.allowedHosts - Flashduty returns an error starting with
alert_id is required: the action’s Action frequency is Summary of alerts; change it to For each alert - Flashduty returns
rule_id is required: the Body is not the template on this page, orrule_idwas changed - Alerts do not recover: make sure a Recovered action exists and the Body keeps
"action_group": "{{alert.actionGroup}}" - Alerts for different hosts merge into one: make sure the rule groups by a field (Group by) and the Body keeps
{{alert.id}} - Flashduty returns
severity ... is not supported:severitymust be Critical, Warning, or Info, or critical, high, medium, or low from Security rules