Manage event handlers
StackState Self-hosted v4.5.x
This page describes StackState v4.5.x. The StackState 4.5 version range is End of Life (EOL) and no longer supported. We encourage customers still running the 4.5 version range to upgrade to a more recent release.
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.
Add an event handler
- 1.Select Manage Event Handlers on the left.
- 2.Click ADD NEW EVENT HANDLER.
- 3.Select the trigger event and event handler to run:
- Run event handler - the event handler function that will run whenever the selected event type is generated.
- 4.Enter the required details, these will vary according to the event handler function you have selected.
- 5.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
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.
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