Include a ready variable in a plugin (out-of-the-box)

I’ve created a data source plugin, and it has a VariableQueryEditor class that allows to create variables.
Is it possible to create some variables and add them to the plugin package, so that a person who installs the plugin will have some out-of-the-box ready variables? (and not have to create them)

Variables are stored inside the dashboard definition, so provisioning variables in that way would require you to specify the dashboard you want to add them to.

If you want to make the variables available to all dashboards, then consider interpolating the variables yourself in your plugin before you use the TemplateSrv.

Thanks Marcus.
Can you please explain the second part? (or link to relevant documentation - I didn’t find relevant explanations)

This topic was automatically closed after 365 days. New replies are no longer allowed.