Storing User-Defined Data - Device Metadata

Use Device Metadata to store additional device information and enable business centric workflows.

Using metadata on devices allows you to extend EdgeIQ's core device management features to match your specific use case. You can store additional data as metadata and refer to it from within workflows, policies, commands, and more via templating. Additionally, specific metadata fields can be highlighted using the Important Metadata feature to be displayed prominently in the UI.

Device Metadata

Device metadata allows flexibility in associating user-defined data with individual devices.

Key Features

  • Storage Scope: Metadata is stored at the individual device level, making it unique to each device.
  • Custom Key-Value Pairs: Users can define custom key-value pairs. This allows for dynamic data storage tailored to specific device needs. Data is stored as strings and can be accessed and converted with workflows as needed.
  • Integration with Workflows: Device metadata can be accessed and referenced in workflows. This enables automation and custom behavior based on metadata values.
  • Integration with Templating Engine: The templating engine has access to metadata fields to use metadata for policies and commands.
  • Management Options Metadata can be added, updated, and deleted via both the User Interface (UI) and API, offering flexibility in how it is managed.

Adding Device Metadata

You can add, update, and remove Device Metadata through the UI via the Metadata device tab:

Updating Device Metadata on the Device Details Page

Updating Device Metadata on the Device Details Page

Device Metadata is also accessible through the API, for more details refer to Create Device API and Device Metadata API description for how metadata is provided as a JSON object through the API. See Bulk CSV Upload as an example for setting metadata through bulk CSV uploads.

Using Metadata in Templates

To use metadata in templates, you can refer to it via the following syntax:

{{ .metadata.<field_name> }}

This can be used with any commands and translators that support templating.

Using Metadata in Workflows

Metadata can be accessed in workflows using the read device metadata and write device metadata nodes. In the example below, the device metadata is read every time a report is received, and a call to an external API is enriched with this metadata.

Workflow using the **read device metadata** node.

Workflow using the read device metadata node.

Within the configuration of the API POST request, the metadata fields can be accessed using msg.metadata.<field_name>, firmware_revision in this example:

Accessing device metadata in workflows

Referring to device metadata in other workflow nodes

Important Metadata

To display specific metadata fields prominently on the Device Details page, you can use Important Metadata. Important Metadata is defined on the Device Profile level and applies to all devices of the same type.

Key Features

  • Storage Scope: Stored at the device profile level, ensuring consistency across all devices of the same type.
  • Highlight Key Information: Marked fields appear prominently on the main device page for all devices of the corresponding profile type. This enables users to highlight a subset of metadata while keeping less critical metadata accessible under the Metadata tab on the device details page.
  • Human-Friendly Labels: Metadata keys can be assigned user-friendly labels for better readability (e.g., firmware_revision can be labeled as Firmware Revision)
  • Customization & Ordering: Drag-and-drop functionality allows users to reorder important metadata, ensuring the most critical information is displayed first.
  • Enhanced Visibility: Important metadata is particularly useful for filtering and providing a quick overview of the most critical data points in the UI.

Set Important Metadata Fields

To mark metadata fields as important, navigate to the Device Profile page (from the left-side menu, select Devices > Device Profiles).

Navigate to the Important Metadata section:

Important Metadata can be set on the device profile

Important Metadata can be set on the device profile

Add the fields (Keys) you want to highlight as important metadata:

Add important metadata fields

Add important metadata fields

You can reorder fields via drag&drop:

Ordering important metadata via drag&drop

Ordering important metadata via drag&drop

Displaying Important Metadata

Navigating back to the Device Details page, you can now see the highlighted metadata on the first screen:

Important Metadata is displayed on the first Device Details page

Important Metadata is displayed on the first Device Details page