Skip to main content
Documentation

Device Telemetry

This guide explains how to collect telemetry from your devices using Nexigon device events.

What are device events? Device events are structured JSON messages emitted by devices. They enable you to track device behavior and monitor device health, warnings, and errors in real-time.

Emitting Events

Use Nexigon Agent to emit events from your device:

nexigon-agent events emit '"This is a test event"'

The event body is an arbitrary JSON object, allowing you to include any relevant data.

Event Severity Levels

Events support six severity levels to classify their importance:

SeverityUse Case
traceLow-level tracing for detailed debugging.
debugDebugging information during development.
infoGeneral informational messages (default).
warningPotential problems that may need attention.
errorProblems that affect functionality.
criticalSevere issues requiring immediate attention.

You can specify the severity when emitting events with the --severity option:

nexigon-agent events emit --severity error '"Sensor connection has been lost"'

Event Categories

Categories are used to specify the type of an event, determining its structure. You can specify the category of an event with the --category option. The category can be an arbitrary string. To avoid conflicts, we recommend using domain prefixes. The number of categories in the system should be kept rather low, to allow for efficient filtering. If you need to attach further high-cardinality information to events, use event attributes.

Event Attributes

You can add key-value attributes using the --attribute option for additional JSON metadata:

nexigon-agent events emit \
  --category "dev.nexigon.ota" \
  --attribute 'currentVersion="1.0.0"' \
  --attribute 'targetVersion="1.1.0"' \
  '"Installing OTA update"'

OpenTelemetry Compatibility

Nexigonโ€™s device event system has taken inspiration from OpenTelemetry. If you are on a dedicated or enterprise Nexigon instance, you can configure an external OTLP collector per project. Nexigon will then export device events via OTLP into your existing observability stack (e.g., Grafana, Datadog, โ€ฆ). Prior to exporting events, Nexigon will enrich events with trusted device data (in particular, device IDs). That way, you can process device events through the systems and tools that you already like and use, including the LGTM stack, while also being able to trust that the events being processed have indeed been emitted by particular devices.