Grafana 可視化工具
下載 Grafana
# 下載地址:https://mirrors.tuna.tsinghua.edu.cn/ [root@zabbix ~]# wget https://mirrors.tuna.tsinghua.edu.cn/grafana/yum/rpm/grafana-6.6.1-1.x86_64.rpm
安裝 Grafana
[root@zabbix ~]# yum localinstall -y grafana-6.6.2-1.x86_64.rpm
啟動 Grafana
[root@zabbix ~]# systemctl start grafana-server.service # 驗證 [root@zabbix ~]# netstat -lntp | grep 3000 tcp6 0 0 :::3000 :::* LISTEN 46915/grafana-server
訪問 Grafana Web
#訪問 http://10.0.0.71:3000/login # 登錄 用戶:admin 密碼:admin # 登錄后讓你重新配置新的密碼 123456 123456
安裝 Grafana-zabbix 插件
# 查看插件列表 [root@zabbix ~]# grafana-cli plugins list-remote # 找到 zabbix 插件 [root@zabbix ~]# grafana-cli plugins list-remote | grep zabbix id: alexanderzobnin-zabbix-app version: 4.0.1 [root@zabbix ~]# grafana-cli plugins install alexanderzobnin-zabbix-app # 安裝插件失敗,因為源在國外,可以使用以下方式 [root@zabbix ~]# cd /var/lib/grafana/plugins/ [root@zabbix plugins]# wget https://www.itsky.tech/download/zabbix/alexanderzobnin-zabbix-app.tar.gz [root@zabbix plugins]# tar xf alexanderzobnin-zabbix-app.tar.gz [root@zabbix plugins]# ll
total 9320
drwxr-xr-x 8 root root 4096 May 20 10:57 alexanderzobnin-zabbix-app
-rw-r--r-- 1 root root 9537875 Sep 10 17:26 alexanderzobnin-zabbix-app.tar.gz
#也可以查看grafana-zabbix-app 庫,安裝最新的插件:
cd /var/lib/grafana/plugins
git clone https://github.com/alexanderzobnin/grafana-zabbix-app
#重啟
systemctl restart grafana-server.service
也可以查看grafana-zabbix-app 庫,安裝最新的插件: cd /var/lib/grafana/plugins
git clone https://github.com/alexanderzobnin/grafana-zabbix-app 然后重啟grafana 使用這樣的方法安裝,能輕易的升級運行grafnan zabbix插件。
使用 Grafana
1.登錄頁面 --- 設置 --- plugins
2.點擊 zabbix 插件 --- enable
3.設置 --- add data source --- 選擇 zabbix
4.配置 zabbix 信息 http://10.0.0.71/zabbix/api_jsonrpc.php