The easiest way to install plugins is by using the CLI tool grafana-cli which is bundled with grafana. Before any modification take place after modifying plugins, grafana-server needs to be restarted.
Grafana Plugin Directory
On Linux systems the grafana-cli will assume that the grafana plugin directory is
/var/lib/grafana/plugins
. It’s possible to override the directory which grafana-cli will operate on by specifying the –pluginsDir flag. On Windows systems this parameter have to be specified for every call.Grafana-cli Commands
List available plugins
grafana-cli plugins list-remote
Install the latest version of a plugin
grafana-cli plugins install <plugin-id>
Install a specific version of a plugin
grafana-cli plugins install <plugin-id> <version>
List installed plugins
grafana-cli plugins ls
Update all installed plugins
grafana-cli plugins update-all
Update one plugin
grafana-cli plugins update <plugin-id>
Remove one plugin
grafana-cli plugins remove <plugin-id>
Installing Plugins Manually
If your Grafana Server does not have access to the Internet, then the plugin will have to downloaded and manually copied to your Grafana Server.
The Download URL from Grafana.com API is in this form:
https://grafana.com/api/plugins//versions//download
You can specify a local URL by using the
--pluginUrl
option.grafana-cli --pluginUrl https://nexus.company.com/grafana/plugins/<plugin-id>-<plugin-version>.zip plugins install <plugin-id>
To manually install a Plugin via the Grafana.com API:
- Find the plugin you want to download, the plugin id can be found on the Installation Tab on the plugin’s page on Grafana.com. In this example, the plugin id is
jdbranham-diagram-panel
:
Comments
Post a Comment
https://gengwg.blogspot.com/