In Flashduty On-call
You can get the integration push URL in either of the following ways.Use a dedicated integration
- In the Flashduty console, select Channel and open a channel
- Select Configuration → Integrations → Private integration, then click Add integration
- Select Sematext, then click Save
- Open the generated integration card and copy the Push URL
Use a shared integration
- In the Flashduty console, go to Integration Center → Alert Events
- Select Sematext and enter an integration name
- Configure the default route and select a channel. You can add more rules under Routing after creation
- Click Save and copy the generated Push URL
Configure Sematext
1
Create a Custom notification hook in Sematext
Where: Sematext Cloud › Alerts › Notification Hooks › New Notification Hook › CustomSign in to Sematext Cloud (US region Click Send Test Notification and confirm that the request succeeds (this is only a connectivity check, see the note below), then click Save Notification Hook.
apps.sematext.com or EU region apps.eu.sematext.com) and open the page above.The left column is the parameter name and the right column is its value; Sematext replaces the
$ variables when it sends the notification:When you are done, the request body in Preview should be:
2
Use the hook in a Sematext alert rule
Where: Sematext Cloud › Alerts › Alert Rules › Notifications tab
Save the rule. To send every new alert rule to Flashduty, set the hook as an account-default hook.
3
Trigger and confirm an alert
- Make an alert rule fire. For example, create a Heartbeat alert for a host and stop the Sematext Agent on it, then confirm that Flashduty receives an active alert
- Resume data collection, wait for Sematext to send the back-to-normal notification, and confirm that the alert recovers
The request sent by Send Test Notification does not belong to any alert rule. Flashduty returns success and does not create an alert.
Alert key
Sematext adds the alert rule ID (ruleId) and rule name (alertName) to every alert notification. When the rule uses Group by, it also adds the group tag values that fired the alert (filters, for example {os.host=web-01}). You do not need to configure these fields in the hook.
The Alert Key is computed from ruleId and all group tags in filters; the order of the tags does not matter. As a result:
- Trigger and recovery notifications for the same alert rule and group go to the same alert
- When an alert rule is grouped by a tag such as host, each group gets its own alert
- Changes to the priority, description, time or rule name do not change the Alert Key
alertName but no ruleId are rejected.
Status and severity
The alert recovers whenbackToNormal is true; any other value is treated as a trigger. The severity comes from the alert rule priority ($priority):
Matching ignores case.
Labels
Troubleshooting
- Flashduty returns a parameter error: Make sure the URL is complete and includes
integration_key, and that Send data as is set to Json - The alert does not recover: Make sure Alert me when the value goes back to non-alert level is on in the rule’s Notifications tab, that the hook has the
backToNormalparameter with the value$backToNormal, and that the group is still sending data - Alerts for different hosts of the same rule are merged: Set Group by on a host tag (such as
os.host) in the alert rule and set the aggregation to all separately - Every alert has the Warning severity: Check
priorityin the pushed content; see Status and severity above