Classify, search, filter and manage your devices at scale using tags.


Overview

๐Ÿ‘

This is a premium feature

Custom tags are available on any of our paid plans.
Device generated tags are available on our PRO plan only.

Dataplicity supports three types of searchable tags:

  1. Device properties;
  2. Manually set custom tags;
  3. Device-generated tags.

Device properties

Device property tags help you quickly identify those of your devices that match a specific hardware or OS profile. These properties are automatically detected by the Dataplicity Agent and vary by device type but can include:

  • Hardware revision (such as a02082, a Raspberry Pi 3B from 2016);
  • Ubuntu OS version;
  • Dataplicity Agent version

Custom tags

Custom tags are a single words with no spaces, but can otherwise be anything you like. Custom tags are manually assigned to each device through the dataplicity apps, or programmatically via the Dataplicity API.

Some common uses include assigning tags to your devices which represent:

  • Customer name;
  • Device model (for example GruntMaster 6000 or GruntMaster 9000);
  • Installation type (outdoors, indoors, submersible); and/or
  • Something else specific to your application.

Device-generated tags

Device generated tags let you search and filter devices according to parameters that matter only to you. The Dataplicity Agent will run a script of your own creation directly on your remote devices, which will in turn generate tags that you can later search on.

This mechanism is intended for the highest volume applications where it's just not feasible to individually code and tag every device.

Common applications include tagging devices that:

  • Contain a specific version of your proprietary client code;
  • Are running low on disk space;
  • Are running high CPU;
  • Are producing too many errors;
  • Have particular packages installed;
  • Find all the GruntMaster 6000s that have been software upgraded to the GruntMaster 9000.

How it works

The Dataplicity Agent will look for an executable script in /home/dataplicity/dataplicity_tags. and will run it every 10 minutes.

This script should produce a line by line list of tags that should be associated with your device, and the output should contain only one alphanumeric string per line, without spaces. Underscore ("_") is permitted.

Create the script

Produce an executable program and save it as /home/dataplicity/dataplicity_tags. In most cases this is a Python or Shell script, but it could equally be a compiled binary. Here's an example of a Python script which will automatically assign specific device parameters to a device:

#!/bin/sh
echo "NAME_GRUNTMASTER"
echo "MODEL_6000"
echo "VERSION_1_0_0"

Make the script executable

Set mode +x on the file as follows:

chmod +x /home/dataplicity/dataplicity_tags

Every 10 minutes the Dataplicity Agent will run this file on your device and will self-register your custom tags. From there, you can search for them in the Dataplicity apps.