grafana-zabbix添加图形&模板化:

http://itnihao.blog.51cto.com/1741976/1716367

zabbix插件之grafana-zabbix实现炫酷图表:

http://8789878.blog.51cto.com/8779878/1681800

http://www.myexception.cn/software-testing/2008870.html

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

1、操作环境

1

2

3

4

5

6

7

[root@Server ~]# cat /etc/issue

CentOS release 6.4 (Final)

Kernel \r on an \m

[root@Server ~]# uname -r

2.6.32-358.el6.x86_64

[root@Server ~]# uname -m

x86_64


2、下载grafana以及安装

1

2

3

4

5

6

7

8

9

10

[root@Server ~]# wget https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm

[root@Server ~]# rpm -ivh grafana-2.6.0-1.x86_64.rpm

rpm -ivh grafana-2.6.0-1.x86_64.rpm

warning: grafana-2.6.0-1.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 3dd18bdd: NOKEY

Preparing...                ########################################### [100%]

   1:grafana                ########################################### [100%

### NOT starting grafana-server by default on bootup, please execute

 sudo /sbin/chkconfig --add grafana-server

### In order to start grafana-server, execute

 sudo service grafana-server start



3、下载zabbix的grafana插件,以及配置相关文件

1

2

3

4

5

6

[root@Server ~]# wget https://codeload.github.com/alexanderzobnin/grafana-zabbix/tar.gz/v2.5.1

[root@Server ~]# tar fxz grafana-zabbix-2.5.1.tar.gz 

[root@Server ~]# cd grafana-zabbix-2.5.1

[root@Server grafana-zabbix-2.5.1]# ls

LICENSE.md  README.md  zabbix

[root@Server grafana-zabbix-2.5.1]# cp -rf zabbix/ /usr/share/grafana/public/app/plugins/datasource/




4、启动grafana服务

1

2

[root@Server ~]# /etc/init.d/grafana-server start

Starting Grafana Server: .... OK

5、测试下zabbix-API。

1

2

3

4

5

6

7

8

9

10

11

12

13

[root@Server ~]# curl -i -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{"user":"Admin","password":"zabbix"},"auth":null,"id":0}' http://192.168.75.128/zabbix/api_jsonrpc.php

HTTP/1.1 200 OK

Date: Thu, 28 Apr 2016 07:43:21 GMT

Server: Apache/2.2.15 (CentOS)

X-Powered-By: PHP/5.5.34

Access-Control-Allow-Origin: *

Access-Control-Allow-Headers: Content-Type

Access-Control-Allow-Methods: POST

Access-Control-Max-Age: 1000

Content-Length: 68

Connection: close

Content-Type: application/json

{"jsonrpc":"2.0","result":"21b85be9259926290f10d70bd7428409","id":0}


wKiom1i4-xPi-Yh9AABjXtNYH2k035.png-wh_50

注:成功后就可以登录配置grafana了


6、登录grafana 界面,http://ip:3000 默认用户和密码均为admin

zabbix安装grafana 酷炫监控插件_第1张图片


在grafana上配置zabbix的数据源

zabbix安装grafana 酷炫监控插件_第2张图片

配置后添加item图形。

zabbix安装grafana 酷炫监控插件_第3张图片

就先这样吧。收工,透透气去。。