Installing Grafana Plugins

From version 3.0+ , Grafana supports panel plugins and apps. With Panels as plugins, its easy to create  and add any kind of panel to display our data in beautiful Grafana dashboard. There is already a strong community of developers contributing to various Grafana Apps and Plugins. Please checkout the official Plugin repository at here , it has lot of useful apps and plugins.

How to install Grafana Plugins?

Best and easiest way to install Grafana plugins is using the in-built “grafana-cli” tool which is bundled with Grafana.

Let us check available commandline options using help command

#grafana-cli -h
NAME:
Grafana cli –
USAGE:
grafana-cli [global options] command [command options] [arguments…]
VERSION:
3.1.1
AUTHOR(S):
Grafana Project <https://github.com/grafana/grafana>
COMMANDS:
plugins Manage plugins for grafana
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
–pluginsDir “/var/lib/grafana/plugins” path to the grafana plugin directory [$GF_PLUGIN_DIR]
–repo “https://grafana.net/api/plugins” url to the plugin repository [$GF_PLUGIN_REPO]
–debug, -d enable debug logging
–help, -h show help
–version, -v print the version

 It supports following commands

list-remote : List available plugins in the Official Repository
install : Install a plugin
ls : List installed plugins
update-all : Update all installed plugins
remove : Remove one plugin
update : Update one plugin

Now let us try to install some plugin

# grafana-cli plugins list-remote
id: abhisant-druid-datasource version: 0.0.2
id: alexanderzobnin-zabbix-app version: 3.2.0
id: belugacdn-app version: 1.2.0
id: bosun-app version: 0.0.25
id: bosun-datasource version: 0.0.5
id: briangann-datatable-panel version: 0.0.1
id: briangann-gauge-panel version: 0.0.2
id: btplc-alarm-box-panel version: 0.0.1
id: btplc-peak-report-panel version: 0.0.1
id: btplc-trend-box-panel version: 0.0.1

Let us install one Panel Plugin, grafana-clock-panel

# grafana-cli plugins install grafana-clock-panel
installing grafana-clock-panel @ 0.0.8
from url: https://grafana.net/api/plugins/grafana-clock-panel/versions/0.0.8/download
into: /var/lib/grafana/plugins
✔ Installed grafana-clock-panel successfully
Restart grafana after installing plugins . <service grafana-server restart>
[root@test.test.com ~]#

Now we have to restart Grafana service

[root@test.test.com ~]# service grafana-server restart
OKopping Grafana Server … [ OK ]
Starting Grafana Server: …. OK
[root@test.test.com ~]#

To remove this plugin

[root@test.test.com ~]# grafana-cli plugins remove grafana-clock-panel
Removing plugin: grafana-clock-panel
Restart grafana after installing plugins . <service grafana-server restart>
[root@test.test.com ~]#

Now you can login to Grafana , the new Clock Panel should be visible under available Panels. Please see  the screenshots below

grafana-clock-panel1

grafana-clock-panel2

I have created a video on this . Please checkout same

 

Leave a Reply

Your email address will not be published. Required fields are marked *