Following commands are used to operate on template variables in json files stored locally under dashboards/temp-vars directory. These commands need Dashboard Context. Please set Dashboard Context before using them.
copy - Copies a template variable from context dashboard to another.
$ wizzy copy temp-var SOURCE DESTINATION
SOURCE
represents template variable number in the context dashboard. Should be a TEMP-VAR_NUMBER
.
DESTINATION
represents DASHBOARD_SLUG.TEMP-VAR_NUMBER
.
For example, If you want to copy 2nd template variable from context dashboard to cpu-stats dashboard at 1st position, use:
$ wizzy copy temp-var 2 cpu-stats.1
move - Moves a template variable from context dashboard to another.
$ wizzy move temp-var SOURCE DESTINATION
For example:
$ wizzy move temp-var 2 cpu-stats.1
remove - Removes a template variable from the context dashboard
$ wizzy remove temp-var TEMP-VAR_NUMBER
For example:
$ wizzy remove temp-var 2
extract - Copies template variable json object and saves it as a separate file under temp-vars directory. This command is useful if you want to re-use this template variable in many dashboards. Later you can use insert
command to insert this template variable into any dashboard. Needs dashboard context to be set.
$ wizzy extract temp-var TEMP-VAR_NUMBER TEMP-VAR_NAME
For example:
$ wizzy extract temp-var 2 var-application
insert - Inserts an extracted template variable from temp-vars directory into a dashboard.
$ wizzy insert temp-var var-application <DASHBOARD_SLUG>
For example:
$ wizzy insert temp-var var-application
$ wizzy insert temp-var var-application cassandra-stats
_Note: TEMP-VARNUMBER starts from 1.