Extensions
Health data does not arrive on its own — it is delivered by extensions, optional capabilities a device negotiates with NervesHub when it connects. Each one is enabled per product, and a device only sends data for the extensions its product has turned on and its client library supports.
Enable the ones you need under Settings → Extensions on the product, then confirm they are also enabled on the device itself — the device page shows which extensions the device actually negotiated.
Extensions are version-negotiated. A device advertises which versions of each extension it supports when it connects, and NervesHub picks a compatible one. An older client that does not know about an extension simply never receives its messages.
Built-in Metrics
NervesHubLink reports the following system metrics automatically when the device is connected:- CPU usage — percentage of CPU time spent in user and kernel space, sampled periodically
- Memory usage — total, used, and free memory in bytes, plus swap if present
- System load averages — 1-minute, 5-minute, and 15-minute load averages, matching the output of
uptimeon Linux
Custom Metrics
Beyond the built-in system metrics, your application can report its own metrics through NervesHubLink. This lets you track application-specific values — such as the number of active connections, sensor readings, queue depths, or any other runtime measurement your firmware produces. Custom metrics appear alongside the built-in metrics on the Device Detail page and are available through the NervesHub API, so you can pull them into external dashboards or alerting systems using the same interface.Alarms
NervesHub fires alarms when metric values exceed configured thresholds. Alarms can be configured at the product level (applying to all devices) or overridden at the individual device level. When an alarm fires:- It appears on the Device Detail page under the Alarms section
- It increments the alarm count shown on the Fleet Dashboard
- It is recorded with a timestamp in the device’s alarm history, so you can see when it started and when it cleared
Viewing Health in the UI
Open any device in the NervesCloud UI and navigate to the Health tab on the Device Detail page. There you’ll find:- Live charts for each metric, updating as new data arrives from the device
- Historical charts letting you scroll back through past metric values
- The current alarm state and a full alarm history with timestamps
Device Logs
NervesHub can stream and store logs from your devices, giving you visibility into what the device was doing at any point in time. Use thenh CLI to access logs directly from the terminal.
Logs require the
logging extension to be enabled on the product and supported by the device’s client library.Log Flags
Use the following flags to narrow the log output to exactly what you need:string
Filter by log level. Accepted values are
debug, info, warning, and error. Only log entries at or above the specified level are returned.string
Full-text search within log message content. Returns only entries whose message body contains the search string.
string
Return logs from this time onward. Accepts relative durations like
30m, 2h, 1d, or absolute timestamps in RFC 3339 format.string
Return logs up to this point in time. Accepts the same format as
--since. Use together with --since to define a fixed time window.integer
Maximum number of log entries to return. Useful when you want a quick sample without paging through the full history.
boolean
Stream logs in real time as the device emits them, similar to
tail -f. Press Ctrl+C to stop streaming.
