The Alerts feature will send a team an alert when heartbeat events satisfy a given threshold for a specific set of filters. To find the feature, click the Alerts item in the sidebar.
Let's create an alert when the battery_pct (battery percentage) is below 5%, for devices with serial numbers starting with MFLT.
- Click Alerts in the sidebar
- Click New Alert in the top right
- Provide a Title and optional Description (but highly advised)!
- Next, the Threshold value is the metric name within a heartbeat
- We set the threshold value to is less than 5.
- We also wanted to make sure that the Device Serial values start with MFLT.
- To do this we click Add, and specify these values. To add multiple filters, click Add and repeat the process
- Above, we have created our Alert! Click OK
Once the Alert is set up, Memfault will watch for Events matching the criteria specified. If it finds any, it will create Incidents, which can be found by clicking on the Alert entry in the Alerts table.
On top of the entries in this view, Memfault will send an email every 5 minutes summarizing the number of devices that meet this threshold. Given this fact, it is best to set up the Alerts so that they are hit rarely to prevent abuse of the email inbox.