Manage event handlers
StackState Self-hosted v5.1.x
Last updated
StackState Self-hosted v5.1.x
Last updated
Event handlers attached to a StackState view listen to events that are generated in relation to components in the view. Event notifications can then be sent or actions can be triggered in response to health state change events or problem events.
All event handlers configured for the view are listed in the StackState UI right panel View summary tab under Event handlers. You can add, edit and remove event handlers from here. Expand an event handler to see its configured settings.
The badge on the right next to the Event handlers section heading shows the number of event handlers configured for the view.
You can add an event handler to a view from the StackState UI right panel View summary tab.
Event handlers can only be added to a saved view. It isn't possible to add event handlers to subviews or while in explore mode.
Open a view.
Select the View summary tab in the right panel.
Expand the Event handlers section. All currently configured event handlers are listed.
To add a new event handler, click ADD NEW EVENT HANDLER. The Add Event Handler popup opens.
Give the event handler a Name.
You can optionally add a Description. This will be displayed in the tooltip whenever a user hovers the mouse pointer over the event handler name in the right panel Event handlers list.
Select the trigger event and the event handler to run:
On event - the event types that should trigger the event notification or automated action. Note that only events related to components are captured in event handlers, relation-related events will be ignored.
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, an 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 a message to a Slack channel or make a POST to a webhook URL. A number of default event handler functions are included out of the box with StackState, these are described below.
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.
The Slack event handler function sends a Slack message with detailed information about the trigger event, including the possible root cause, to the configured Slack webhook URL. See how to create a Slack Webhook (slack.com).
Can be triggered by Health state change events and Problem events.
Requires the Slack StackPack to be installed on your StackState instance.
The HTTP webhook POST event handler function sends a POST request to the specified URL.
Can be triggered by Health state change events only.
The SMS event handler function sends an SMS with details of a health state change event using MessageBird.
Can be triggered by Health state change events only.
The email event handler function will send details of a health state change event using a configured SMTP server.
Can be triggered by Health state change events only.