我的环境是:

Zabbix 是 2.2.7

Zabbix-Grafana 是 2.5

Download: https://github.com/alexanderzobnin/grafana-zabbix/releases/ 

Grafana 是 2.5

Download: http://docs.grafana.org/installation/rpm/ 

关于如何部署的话 可以参考原文:

https://github.com/alexanderzobnin/grafana-zabbix/wiki/Installation#note-for-zabbix-22-or-less

和一个中国哥们写的博客: 

http://blog.csdn.net/wanglei_storage/article/details/48397333 

大致步骤是:

一, 先下载 http://docs.grafana.org/installation/rpm/ 并安装 RPM 包, 这一步只是安装这个 Grafana服务器而已 非常简单

二, 下面就是安装关于zabbix的插件:

先这个文件Grafana-Zabbix 2.5

https://github.com/alexanderzobnin/grafana-zabbix/releases/ 

然后上传到Grafana 的服务器中,然后执行下面的命令

cp -rf grafana-zabbix/zabbix /usr/share/grafana/public/app/plugins/datasource/

上面配置已经okay了

三, 下面就是在zabbix 的server上的配置:

        Mysql赋权用户和在Zabbix Web界面创建用户show:

       (1)、对Zabbix数据库用户赋权

mysql> grant all privileges on zabbix.* to 'show'@'localhost' identified by 'show';
mysql> grant all privileges on zabbix.* to 'show'@'192.168.0.216' identified by 'show';
mysql> flush privileges;

     (2)、在Zabbix Web界面中添加用户show

单击Administrator,选择Users,Create User由于这边是测试环境,你可以选择将Show用户添加到Administrator
如果想谨慎点,那么就创建一个group,并且给该group赋予read权限,再把User添加到group里面
例如:下面我把show用户添加到了Group show里面user:showpass:show

四、验证Zabbix json配置档api_jsonrpc.php

至少在当前zabbix 2.5.0环境中,确保当前的这些信息已经存在
vim /usr/local/zabbix/php/api_jsonrpc.php

header( 'Access-Control-Allow-Origin: *' );
header( 'Access-Control-Allow-Headers: Content-Type' );
header( 'Access-Control-Allow-Methods: POST' );
header( 'Access-Control-Max-Age: 1000' );if   ($_SERVER[ 'REQUEST_METHOD' ] ===  'OPTIONS' ) {return ;
}require_once dirname(__FILE__).'/include/func.inc.php';require_once dirname(__FILE__).'/include/classes/core/CHttpRequest.php';

五,启动服务:

service grafana-server start

六, 登录:

http://your_ip:3000

七, 添加数据源和API:

我们看到已经打开Grafana Web页面啦
Default Account
User:admin
Pass:admin



下面的事情全部是在web中操作了,参考下面的文章:

 https://github.com/alexanderzobnin/grafana-zabbix/wiki/Installation#note-for-zabbix-22-or-less

最重要的是中间多了一个test connection的选项,非常重要

非常感谢Alexander Zobnin的帮忙

如果有什么问题 可以留言。