环境说明:
Zabbix server:192.168.120.128
# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
3121e3d944aa grafana/grafana "/run.sh" 4 weeks ago Up 7 minutes 0.0.0.0:3000->3000/tcp grafana
# ss -anplt |grep 3000
LISTEN 0 128 [::]:3000 [::]:* users:(("docker-proxy-cu",pid=65854,fd=4))
步骤一、grafana容器内安装zabbix-grafana插件
# docker ps -a |grep grafana
3121e3d944aa grafana/grafana "/run.sh" 4 weeks ago Up 19 minutes 0.0.0.0:3000->3000/tcp grafana
# docker exec -it 312 /bin/bash
bash-5.0$ grafana-cli plugins ls
bash-5.0$ grafana-cli plugins install alexanderzobnin-zabbix-app
installing alexanderzobnin-zabbix-app @ 3.9.1
from url: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/3.9.1/download
into: /var/lib/grafana/plugins
✔ Installed alexanderzobnin-zabbix-app successfully
Restart grafana after installing plugins . <service grafana-server restart>
bash-5.0$ grafana-cli plugins ls
installed plugins:
alexanderzobnin-zabbix-app @ 3.12.2
Restart grafana after installing plugins . <service grafana-server restart>
bash-5.0$ exit
exit
步骤二、重启grafana容器
# docker stop `docker ps -a | grep grafana | awk '{print $1}'`
# docker start `docker ps -a | grep grafana | awk '{print $1}'`
步骤三、添加支持插件
步骤四、添加zabbix的监控图
添加数据源完成
添加图像模板
备注:
1.grafana登录默认是admin/admin
2.url::http://x.x.x.x/api_jsonrpc.php
3.zabbix api details : Admin/zabbix zabbix web界面的默认登录账号和密码:Admin/zabbix