GrafanaでZabbixをデータソースにするプラグインをオフライン環境で導入する


やりたいこと

GrafanaのデータソースとしてZabbixを設定するためのプラグイン導入手順。
インターネットに接続していないオフライン環境で、grafana-cliコマンドを使わずにインストールする。

GrafanaのZabbix用のプラグイン

Zabbixプラグインは公式ではなく、コミュニティのプラグインである。

Grafanaの公式ページのZabbixプラグインの紹介
https://grafana.com/grafana/plugins/alexanderzobnin-zabbix-app
Zabbixプラグインの公式ページ
https://alexanderzobnin.github.io/grafana-zabbix/

Grafanaの公式ページのZabbixプラグインの紹介のInstallationタブの

Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.

のdownload the .zip fileからZIPファイルで入手できる。

オフライン環境でのインストール手順

Grafanaの公式ページのZabbixプラグインの紹介で、
grafana-cliコマンドを使わない方法として

Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.

とあるので、
ダウンロードしたZIPファイルを解凍して、プラグイン用のディレクトリに置けばインストールできることが分かる

Zabbixプラグインの公式ページのインストールの説明では下記のようにあるが、自分の環境では手動インストールで問題なく動いています。

WARNING! The only reliable installation method is grafana-cli. Any other ways should be treated as a workaround an don't provide any backward-compatibulity guaranties.

解凍とプラグイン用のディレクトリへのコピー

Grafanaのプラグインは、/var/lib/grafana/plugins/下におけばよいので、
解凍して配置する。

# unzip alexanderzobnin-grafana-zabbix-v3.10.4-1-g29a98f5.zip
# cp alexanderzobnin-grafana-zabbix-29a98f5 /var/lib/grafana/plugins/

再起動

Grafanaを再起動する

# service grafana-server restart

GrafanaのWEB画面での有効化

このプラグインは、GrafanaのWEB画面でEnableにする操作が必要。
これはOrganizationを分けている場合は、各Organizationごとに実施する。

下記のような説明だが、プラグインの管理画面はGrafanaのバージョンによって違う。
自分の環境のGrafanaはVer4で、
メイン画面の左上のGrafanaアイコン→Plugins→Appsタブ→Zabbixを選択→Enableをクリックだった

Grafanaの公式ページのZabbixプラグインの紹介の説明

Next, log into your Grafana instance. Navigate to the Plugins section, found in your Grafana main menu.
Click the Apps tabs in the Plugins section and select the newly installed app.
To enable the app, click the Config tab. Follow the instructions provided with the application and click Enable. The app and any new UI pages are now accessible from within the main menu, as designed by the app creator.

If dashboards have been included with the application, they will attempt to be automatically installed. To view the dashboards, re-import or delete individual dashboards, click the Dashboards tab within the app page.

他のプラグイン

公式ページで、公式/コミュニティのプラグインが紹介されている。
https://grafana.com/grafana/plugins

自分は、円グラフやパーセンテージ出すためにパイチャートを入れた
https://grafana.com/grafana/plugins/grafana-piechart-panel