Discover Labels - Manipulating existing Labels to make new ones

Labels are useful in Discover: to remove data from the database, to eliminate the noise from your view, to group common items together or to alert on these items.

Discover users often want to create a new label, and want to know if there is a way to duplicate or manipulate an existing label to not have to start from scratch. This is possible now in the Tanium Discover console. In Discover 2.11, exportable labels are now a JSON text file, which means you can easily make changes to the file and reimport. You are only allowed ONE name to a label; this is defined in the JSON file so be sure to change the right fields.

Let's start with an example of changing a single label: altering a label for Dell computers, to now be used for Lenovo computers. The label currently has Dell in the Manufacturer column, and we will have to change that value to Lenovo.

First we Export this so we can manipulate the JSON:


DiscLabelsManip_184834a4-5973-4d54-bbb4-48cf2f33ee2d.png

The language inside the JSON is pretty easy to follow, consisting of information about the rule, operations and values, and the activity the label commits:


DiscLabelsManip_78d282f4-46ac-456a-9b57-e23f3bedfc95.png
NOTE: The formatting is a single line of JSON. I have run this through a "pretty print" routine to make it easier to see and edit.

In order to change the label Manufacturer from Dell systems to Lenovo, I would need to make two changes to this JSON in my favorite editor. The first is the name field, this is what Discover will call the label. The second is(are) the value(s) I want to change. In this example it is only the value for the Manufacturer field, but the labels could become very complex in some cases.


DiscLabelsManip_0193b583-90db-4b0e-8672-e11076dffccf.png

Save this file and then use the Import function on the Interface Labels page:


DiscLabelsManip_dd47bf2b-ca0e-47ca-939a-dc585e759e14.png

Select the file:


User-added image

Confirm the import (Close):


User-added image

And enjoy the new label:


DiscLabelsManip_2f0bbdf0-a431-433a-8c33-5831f8445862.png

On import if there is more than one label in the JSON file, it will show you a confirmation on each that was imported but overwrite will fail: the error message will claim the JSON is invalid, however the issue is that it cannot overwrite an existing name. 

This is a simple example of the functionality to manipulate existing labels to create new ones; please reach out to your TAM for any questions.