Manage event handlers

StackState Self-hosted v5.0.x

This page describes StackState version 5.0.

Go to the documentation for the latest StackState release.

Overview

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.

Configured event handlers

When you open the Manage Event Handlers panel on the left 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.

Add event handler

You can add an event handler to a view from the StackState UI.

  1. Select Manage Event Handlers on the left.

  2. Click ADD NEW EVENT HANDLER.

  3. 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.

  4. Enter the required details, these will vary according to the event handler function you have selected.

  5. Click SAVE.

Event handler functions

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 functionHealth state change eventsProblem eventsDescription

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

See also

Last updated