This guide will teach you how to create an event in Formant and configure notifications and actions triggered by that event.
- In Formant, in the upper-left corner, open the menu and go to Settings >> Events.
- In the upper-right corner, click Add Event Trigger. Give your event a name and click Continue.
- 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.
- Choose an event trigger type:
|Event trigger type||Usage|
|Datapoint event||Trigger the event based on a value from a data stream.|
|Device-online detection||Trigger the event when the associated devices come online.|
|Device-offline detection||Trigger the event when the associated devices go offline.|
|Custom event||1. Create a custom event using the Formant Admin API.|
2. Enter the name of your custom event here.
3. Proceed to Step 4.
- 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:
|ON||This event will check the trigger condition periodically according to the interval you set. If the trigger condition is met, the event is triggered.|
|OFF||This 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.
- Define the trigger for your event:
|Trigger condition||Valid stream type||Usage|
|Data presence||Any||The event is triggered when a new datapoint is ingested on this stream.|
|Threshold||Numeric||Each 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 expression||Text||Each datapoint in this text stream is compared to the regular expression you define. If the regular expression is matched, the event is triggered.|
|Bit matching||Bitset||Each 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 set||Numeric set||Each 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).
|Battery||Battery||Configure Threshold events for battery percentage, voltage, current, and/or charge.|
|JSON||JSON stream||Enter a valid jq query to apply to incoming JSON stream data. If your query evaluates to |
For more information on jq query syntax, see the jq website.
- If you are configuring a stateful (non-periodic) event, configure your criteria to exit the event state.
- Click Next.
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.
- Configure the notifications and actions triggered by your event:
|Message Format||Customize the text of the event. You can also include information from the event by including the following template variables in your custom event message:|
|Notification||You 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:
- Info (blue)
- Warning (purple)
- Error (orange)
- Critical (red)
|Commands||One or more commands can be triggered as part of an event. For more information, see Commands.|
|Configuration||A 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 Forwarding||You can forward an event to Slack. For more information, see Send events to Slack.|
|PagerDuty Forwarding||You can forward an event to PagerDuty. For more information, see Send events to PagerDuty.|
|Webhook Forwarding||You can forward an event to Webhooks. For more information, see Trigger Webhooks from events.|
|SMS Forwarding||You can forward an event as an SMS. For more information, see Event-triggered SMS alerts.|
- 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].
Updated 21 days ago