LoginSignup
4
7

Zabbix6.0とGrafanaを連携する

Posted at

環境

OS:CentOS8
zabbix6.0
Grafana10.0.2
PostgreSQL14

インストール

公式ドキュメント通り

[admin@hostname ~]$ sudo yum install -y https://dl.grafana.com/enterprise/release/grafana-enterprise-10.0.2-1.x86_64.rpm
[admin@hostname ~]$ sudo systemctl start grafana-server.service
[admin@hostname ~]$ sudo systemctl enable grafana-server.service

Zabbix連携プラグインインストール

ドキュメント通りインストール、完了後Grafanaの再起動

[admin@hostname ~]$ sudo grafana-cli plugins install alexanderzobnin-zabbix-app
✔ Downloaded and extracted alexanderzobnin-zabbix-app v4.3.1 zip successfully to /var/lib/grafana/plugins/alexanderzobnin-zabbix-app

Please restart Grafana after installing or removing plugins. Refer to Grafana documentation for instructions if necessary.

[admin@hostname ~]$ sudo systemctl restart grafana-server.service

初期設定

Grafanaへのアクセス

ブラウザからインストールしたサーバの3000番ポートへアクセス

http://<<IP ADDRESS>>:3000

下記ユーザ、パスワードでログイン後パスワード変更
user : admin
padd : admin

プラグイン有効化

設定のプラグイン一覧からZabbixを選択し有効化
image.png

データソース設定(PostgreSQL)

ZabbixのDirect DB Connectionを使いたいのでPostgreSQLのデータソースを追加。
Direct DB Connectionを利用しない場合は設定不要。
HOME > Connections > Data sources > PpstgreSQL に移動。
下記画像の赤枠で示した接続情報を入力。
完了後下部の「Save & test」を押下。
エラーが出なければ完了。
image.png

データソース設定(Zabbix)

HOME > Connections > Data sources > Zabbix に移動。
パラメータを入力。
URLはZabbixサーバのURLを指定。今回は同じサーバにインストールしたため以下を入力。

http://localhost/zabbix/api_jsonrpc.php

Username, Password はZabbixのログイン時に使用する物を入力。
image.png
Direct DB Connectionを利用する場合は有効化し、先ほど作成したデータソースを選択。
image.png

完了後下部の「Save & test」を押下。
エラーが出なければ完了。問題なければ下記メッセージが表示されます。
image.png

ダッシュボード作成

はよしなにやってください。

4
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
7