Create an event and configure notifications

This guide will teach you how to create an event in Formant and configure notifications and actions triggered by that event.

Step 1: Create the event

  1. In Formant, in the upper-left corner, open the menu and go to Settings >> Events.
  2. In the upper-right corner, click Add Event Trigger. Give your event a name and click Continue.

Step 2: Select devices

  1. Select which devices can trigger this event. You'll do this by choosing a tag which relates the event and the device. Once you've selected your devices, click Next.

📘

For more information on tags, or if you haven't yet configured your device(s) with tags, see Configure access levels.

Step 3: Configure triggers

  1. Choose an event trigger type:
Event trigger typeUsage
Datapoint eventTrigger the event based on a value from a data stream.
Device-online detectionTrigger the event when the associated devices come online.
Device-offline detectionTrigger the event when the associated devices go offline.
Custom event1. Create a custom event using the Formant Admin API. 2. Enter the name of your custom event here. 3. Proceed to Step 4.
  1. Decide if you want your event to occur periodically, or if you want it to occur only when your device enters or exits a given state:
Trigger periodicallyUsage
ONThis event will check the trigger condition periodically according to the interval you set. If the trigger condition is met, the event is triggered.
OFFThis event will occur only when the device enters or exits a state you define (stateful).

📘

Periodic events will trigger only once within the period you define.

🚧

Stateful events require an agent version greater than 1.132. To check your agent version and update to the newest version, see Update the agent.

You cannot create a stateful event on a default stream, such as $.host.cpu.

  1. Define the trigger for your event:
Trigger conditionValid stream typeUsage
Data presenceAnyThe event is triggered when a new datapoint is ingested on this stream.
ThresholdNumericEach datapoint in this numeric stream is compared to a value you define. If the comparison returns True, the event is triggered.

Available comparison operators: >, ≥, <, ≤, =, ≠
Regular expressionTextEach datapoint in this text stream is compared to the regular expression you define. If the regular expression is matched, the event is triggered.
Bit matchingBitsetEach key in this bitset stream is compared to the True/False value you define. If the key-value pair you define is present in the bitset stream, the event is triggered.

You can add multiple bit keys and configure your event to trigger if any bit key matches your conditions, or only if all conditions are met (i.e., an OR condition or an AND condition).
Numeric setNumeric setEach datapoint in this numeric set stream is compared to the threshold(s) you define. If the comparision(s) return True, the event is triggered.

You can add multiple fields and configure your event to trigger if any field matches your conditions, or only if all conditions are met (i.e., an OR condition or an AND condition).
BatteryBatteryConfigure Threshold events for battery percentage, voltage, current, and/or charge.
JSON (stateful event only)JSON streamEnter a valid jq query to apply to incoming JSON stream data. If your query evaluates to true, the event is triggered.

For more information on jq query syntax, see the jq website.
  1. If you are configuring a stateful (non-periodic) event, configure your criteria to exit the event state.

🚧

Verify your event triggers

Events are immutable in Formant. Make sure your event triggers are configured correctly, as once an event's trigger condition has been met, you cannot modify or delete the associated event from your organization.

  1. Click Next.

Step 4: Configure notifications and actions

In addition to showing up on your Formant timeline, you can also configure events to perform actions, or forward them to external messengers. While configuring notifications and actions is not mandatory, it greatly extends the functionality of events.

  1. Configure the notifications and actions triggered by your event:
PropertyUsage
Message FormatCustomize the text of the event. You can also include information from the event by including the following template variables in your custom event message:

- {{event_description}}
- {{event_url}}
- {{device_name}}
- {{datapoint_value}}
NotificationYou can configure your event to send notifications when it is triggered. Notifications appear next to your device in the device list, and next to the bell icon in the device view.

You can also choose the severity of the notification, which sets its color on the timeline and on the overview page:

- Info (blue)
- Warning (purple)
- Error (orange)
- Critical (red)
CommandsOne or more commands can be triggered as part of an event. For more information, see Commands.
ConfigurationA configuration template can be triggered when an event occurs. This can be used to trigger ingestion of streams, pause specific streams or change the rate of ingestion of any stream. For more information, see Configuration templates.
Slack ForwardingYou can forward an event to Slack. For more information, see Send events to Slack.
PagerDuty ForwardingYou can forward an event to PagerDuty. For more information, see Send events to PagerDuty.
Webhook ForwardingYou can forward an event to Webhooks. For more information, see Trigger Webhooks from events.
SMS ForwardingYou can forward an event as an SMS. For more information, see Event-triggered SMS alerts.
  1. Once you have configured your notifications and actions, click Save to create your event.

👋

If you notice an issue with this page or need help, please reach out to us! Use the 'Did this page help you?' buttons below, or get in contact with our Customer Success team via the Intercom messenger in the bottom-right corner of this page, or at [email protected].