tenant set-metric-labels

Prev Next

Note

This command is introduced in VAST Cluster 5.4.3.

This command sets or removes values for metrics labels for a tenant.

Usage

 tenant set-metric-labels  --id ID
                          [--labels LABELS ]|[--drop]

     

Required Parameters

--id ID

Specifies the tenant ID.

Options

--labels LABELS

Specifies which labels to set values for explicitly for the tenant and sets their values.

Note

Labels that are not set explicitly for the tenant appear with their default values for prometheus metrics.

Specify LABELS as a comma-separated list of KEY=VALUE pairs. KEY must be the key set for an existing metrics label. VALUE can be any string that you want to set as the value for the label for the specific tenant.

For example, --labels customer=customerX,purpose=external,region=us-west

--drop

Removes all metric label values from the tenant.

Example

This example associates the (existing) labels purpose and region with the tenant whose ID is 2 and sets values for those labels for that tenant to internal and us-west.

vcli: admin> tenant set-metric-labels --id 2 --labels purpose=internal,region=us-west
Successfully set metric labels for tenant 2

This example removes all label values set on the tenant that has ID 3:

vcli: admin> tenant set-metric-labels --drop --id 3
Successfully set metric labels for tenant 3