Feedback
Feedback

If you are having issues with the exercises, please create a ticket on DevZone: devzone.nordicsemi.com
Drag & Drop Files, Choose Files to Upload You can upload up to 2 files.

Setting up alerts

In earlier lessons, you learned how to inspect a device, read the fleet dashboards, and ship updates. All of that is work you do when you go looking for a problem. Alerts flip that around: nRF Cloud watches your fleet for you and notifies you the moment a condition you care about is met, so you find out about trouble before your customers do.

An alert sends a notification when monitored devices satisfy a condition you define. nRF Cloud offers four alert types, each answering a different question about your fleet.

Alert typeTriggers whenAnswers
Fleet thresholdA fleet-wide aggregation of a timeseries metric meets a condition (evaluated hourly).“Is a problem trending across my whole fleet?”
Device thresholdA metric value in a report from any single device meets a condition (evaluated as each report arrives).“Has any individual device crossed a line?”
Device offlineA monitored device stops checking in with nRF Cloud (evaluated every five minutes).“Has a device gone silent?”
RebootA device or fleet reboot count meets a condition (evaluated as reboot data arrives).“Are devices restarting more than they should?”

Fleet threshold alerts

Fleet threshold alerts operate on an aggregate condition across many devices. For example, you can trigger an alert when the production cohort surpasses a mean of five connection failures within one hour. Only metrics marked as timeseries can be used in the condition, and nRF Cloud evaluates these alerts every hour.

Device threshold alerts

Device threshold alerts trigger when any single device reports a value that meets your condition, for example, battery_perc < 5. Whenever nRF Cloud receives a heartbeat with metrics, it evaluates the applicable alerts and creates an incident for the device that crossed the line.

To keep incidents from being noisy, each alert has an incident start delay (how long the condition must hold before an incident is declared) and an incident end delay (how long the condition must be clear before the incident resolves). A brief spike that recovers within the start delay is ignored; a flapping condition is held in the ALERTING state until it stays clear for the end delay.

Device alert threshold and delays

The example above has a 15-minute start delay and a 30-minute end delay:

  • At (a) 0:30 h, the device captures a value above the threshold, but no incident is created yet. The device captures a new value below the threshold at 0:45 h, so this momentary spike is ignored.
  • At (b) 2:15 h, the device captures another value above the threshold. A further above-threshold value arrives at 2:30 h, which is when the incident is created, because the start delay of 15 minutes has passed. If you enable Notify: when an incident starts, nRF Cloud notifies the configured targets when it receives this value.
  • At (c) 3:00 h, the device captures a value below the threshold. The incident is not resolved yet, because the end delay of 30 minutes has not passed, and the device captures a new value above the threshold shortly after, keeping the incident in the ALERTING state.
  • At (d) 3:30 h, the device captures another value below the threshold. The incident is resolved when an additional below-threshold value arrives at 4:00 h, because the end delay of 30 minutes has passed. If you enable Notify: when an incident is resolved, nRF Cloud notifies the configured targets when it receives this value.

Device offline alerts

Device offline alerts trigger when a monitored device stops uploading data. nRF Cloud checks every five minutes whether each device has checked in within the allowed window. Set the start delay to at least the expected check-in interval; otherwise the alert will constantly create and resolve incidents. Because evaluation runs every five minutes, the worst-case detection latency is the start delay plus five minutes.

Reboot alerts

Reboot alerts notify you when devices restart more than they should, and are especially good at catching a regression in a new firmware release. They support three scopes:

  • Per Device: a single device reboots more than N times in a window.
  • Fleet Percentage: a percentage of the fleet exceeds a reboot count.
  • Change over Period: week-over-week or month-over-month change in reboot count, ideal for spotting a bad release.

A Reboot Reason Filter narrows the alert to All Reboots, All Unexpected (watchdog resets, hard faults, and similar), or a Custom set of reason codes.

Where alerts go, and what an incident looks like

You can route any alert to email, Slack, or a webhook using notification targets. For device alerts, nRF Cloud creates incidents that appear in the Alerts view, listed per device; expanding an incident shows the metric payload that triggered it. Fleet threshold alerts notify you but do not create per-device incidents.

Event payload that triggered a low battery alert

Optional hands-on (nRF Cloud sandbox)

In the nRF Cloud sandbox, open the Alerts view and inspect a device that is currently alerting. Note the metric that tripped it, then imagine the fix: in Lesson 4 you saw how an update ships over the air. After a fix rolls out, the device’s reliability rebounds, which you can watch in the Device Vitals dashboard. We tie this loop together at the end of the lesson.

Switch language?

Progress is tracked separately for each language. Switching will continue from your progress in that language or start fresh if you haven't begun.

Your current progress is saved, and you can switch back anytime.

Register an account
Already have an account? Log in
(All fields are required unless specified optional)

  • 8 or more characters
  • Upper and lower case letters
  • At least one number or special character

Forgot your password?
Enter the email associated with your account, and we will send you a link to reset your password.