zabbix配置grafana并增加交换机端口
grafana安装
# 直接使用官方源安装,比较慢
[root@zabbix ~]# vim /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packages.grafana.com/oss/rpm
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packages.grafana.com/gpg.key
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
yum install grafana
# 安装相关图像软件
yum -y install fontconfig freetype* urw-fonts
# 查看安装信息
[root@zabbix ~]# rpm -qc grafana
/etc/init.d/grafana-server
/etc/sysconfig/grafana-server
/usr/lib/systemd/system/grafana-server.service
启动服务
systemctl daemon-reload systemctl start grafana-server systemctl enbale grafana-server
访问信息
# 防火墙放行端口 firewall-cmd --add-port=3000/tcp --zone=public --permanent firewall-cmd --reload
# 访问地址
http://SeverIP:3000
# 用户名/密码,登录后要求修改
admin/admin
安装zabbix插件
[root@zabbix ~]# grafana-cli plugins list-remote [root@zabbix ~]# grafana-cli plugins install alexanderzobnin-zabbix-app installing alexanderzobnin-zabbix-app @ 3.10.5 from url: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/3.10.5/download into: /var/lib/grafana/plugins ✔ Installed alexanderzobnin-zabbix-app successfully Restart grafana after installing plugins . <service grafana-server restart>
systemctl restart grafana-server
[root@zabbix ~]# systemctl restart grafana-server
配置zabbix连接grafana
-
点击Enable now 进入zabbix插件页并启用
-
添加数据源
-
从官方导入dashboard模板
可以查看出图了。