Manage event handlers
StackState Self-hosted v4.6.x
Last updated
StackState Self-hosted v4.6.x
Last updated
This page describes StackState version 4.6.
Event handlers attached to a StackState view listen to generated StackState events. Event notifications can be sent or actions can be triggered in response to health state change events or problem events generated within the view.
When you open the Manage Event Handlers pane on the left-hand side of the StackState UI, a list of all event handlers currently configured for the view is displayed. You can add, edit and remove event handlers from here.
You can add an event handler to a view from the StackState UI.
Select Manage Event Handlers on the left.
Click ADD NEW EVENT HANDLER.
Select the trigger event and event handler to run:
On event - the event types that should trigger the event notification or automated action.
Run event handler - the event handler function that will run whenever the selected event type is generated.
Enter the required details, these will vary according to the event handler function you have selected.
Click SAVE.
Event handlers listen to events generated within a view. When the configured event type is generated, the event handler function is run to send an event notification or trigger an action in a system outside of StackState. For example, an event handler function could send an email or make a POST to a webhook URL. A number of default event handler functions are included out of the box with StackState.
StackState ships with the following event handler functions that track health state change events in a view:
Event handler function | Health state change events | Problem events | Description |
---|---|---|---|
Slack | ✅ | ✅ | Requires the Slack StackPack. Sends a message with detailed content on the trigger event and possible root cause to the configured Slack webhook URL. See how to create a Slack Webhook (slack.com). |
HTTP webhook POST | ✅ | - | Sends an HTTP webhook POST request to the specified URL. |
SMS | ✅ | - | Sends details of a health state change event using MessageBird. |
An email event handler is available that sends details of a health state change event using a configured SMTP server.
A full list of the event handler functions available in your StackState instance can be found in the StackState UI, go to Settings > Functions > Event Handler Functions