Sematext Alerts
The built-in Sematext Alerts trigger initiates a flow when it receives a signal from a Sematext alert.
Add the Sematext Alerts trigger to the canvas
- Go to the Triggers tab in the palette, expand the App Triggers section, and drag the trigger onto the canvas.
- Double-click the trigger (or click the pencil icon).
- Set the authenticating user, and then copy the URL and Configuration Payload — you'll use these to set up a webhook in Sematext. Alternatively, you can create an integration user to use as the authenticating user.
- Click the Flood Control tab to edit the trigger's default flood control settings. For more information about these settings, see Trigger Flood Control.
- Click Done.
- On the flow canvas, connect the steps you want to run when xMatters receives a request to that URL.
You're now ready to configure Sematext to target the trigger.
Configure Sematext to send requests to the trigger URL
To have Sematext send alerts to the flow trigger, you need to configure a webhook and set it to use the trigger URL.
Create an integration between Sematext and xMatters.
- In Sematext, navigate to the Alerts tab and select Notification Hooks.
- If you don't have any notification hooks, click Create Notification Hook. If you have existing notification hooks, click New Notification Hook.
- Select the Custom webhook icon.
- Fill in the following fields for the webhook:
- Hook Name: xMatters
- URL: Paste the trigger URL you copied from the Sematext Alerts trigger in Flow Designer.
- Send data as: Json
- HTTP method: Post
- Add the target names of any recipients you want xMatters to notify when the alert fires to the end of the URL.
- For URL authentication, use an ampersand to attach recipients. For example, if you want to notify Emma Pearson and the on-call members in the group responsible for the Antares service, you'd add &recipients=epearson,antares to the URL.
- For other authentication types, use a question mark to attach recipients. For example, if you want to notify Barry Gull and the on-call members in the group responsible for the Cassiopeia service, you'd add ?recipients=bgull,cassiopeia to the URL.
- You must URL-encode any special characters or spaces in the target names.
- In the Parameters section, click Add Parameter, and fill in the following fields:
- Key: alert
- Value: Paste the Configuration Payload you copied from the Sematext Alerts trigger in Flow Designer.
- Optional: If you use Basic Authentication, click Add Header and fill in the following fields:
- Key: Authorization
- Value: Basic <your-Base64-encoded-username:password>
You can create a Base64 encoded username and password at https://www.base64encode.org/ or by typing echo “username:password” | base64 into a terminal
- Click Send Test Notification.
- In Flow Designer, check the Activity panel log to ensure the notification came through.
- In Sematext, click Save Notification Hook.
Now that the notification hook is created, attach it to an alert.
- Go to Alert Rules and select an existing alert to edit, or click New Alert Rule to create a new alert.
- On the Edit Rule window, select Notifications.
- In the Send to: field, add the new xMatters notification hook you just created.
- Save the alert rule.
You're ready to use the webhook to trigger automated flows, including steps such as sending alerts and initiating incidents, though we always recommend testing before putting things into use.
Outputs
The trigger has the following outputs you can use as inputs to steps further along the flow.
Label |
Description |
---|---|
Recipients | List of targeted recipients. Recipients are set by adding a recipients query parameter to the trigger URL when you configure the webhook in Sematext. |
Signal Mode | Determines the flow path to follow, based on the value of the Status parameter. |
Application ID |
Unique ID of the application in Sematext |
Back To Normal |
Whether the alert is active or inactive. Valid values are:
|
Description | Description of the alert as provided by Sematext. |
Rule Type | Type of alert rule as provided by Sematext. |
Timestamp | Timestamp of when the alert was created in Sematext, in UTC. |
Title | Title of the alert as provided by Sematext. |
URL | Direct URL to the alert details screen in Sematext. |
Raw Request | JSON representation of the request that can be parsed separately to get additional context on outputs. |