Classify, search, filter and manage your devices at scale using tags.
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 two types of searchable tags:
- Device property tags;
- Custom tags.
Custom tags could be divided into two categories:
- Manually set custom tags;
- Device-generated custom tags.
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
There are two types of custom tags: manually added and device-generated. Manually added tags are easy to add when device-generated tags have wide functionality.
Custom tags are single words with no spaces, but can otherwise be anything you like. Custom tags are manually assigned to each device through the dataplicity app.
To add a new custom tag to your device, click the pen sign to edit the device, after that write your tag in the tags window and press enter or comma sign to accept it. Click "Update" to save tags. Now you can see your entered tags in the tags list.
Some common uses include assigning tags to your devices which represent:
- Customer name;
- Device model;
- Installation type (outdoors, indoors, submersible); and/or
- Something else specific to your application.
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.
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.
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:
Set executable mode 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.
Updated over 1 year ago