zabbix3.0.2安装grafana
1、操作环境# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m
# uname -r
2.6.32-358.el6.x86_64
# uname -m
x86_64
2、下载grafana以及安装
# wget https://grafanarel.s3.amazonaws.com/builds/grafana-2.6.0-1.x86_64.rpm
# 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... ###########################################
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插件,以及配置相关文件
# wget https://codeload.github.com/alexanderzobnin/grafana-zabbix/tar.gz/v2.5.1
# tar fxz grafana-zabbix-2.5.1.tar.gz
# cd grafana-zabbix-2.5.1
# ls
LICENSE.mdREADME.mdzabbix
# cp -rf zabbix/ /usr/share/grafana/public/app/plugins/datasource/
4、启动grafana服务
# /etc/init.d/grafana-server start
Starting Grafana Server: .... OK 5、测试下zabbix-API。
# 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}
http://blog.运维网.com/e/u261/themes/default/images/spacer.gifhttp://s4.运维网.com/wyfs02/M02/7F/8C/wKiom1ch6NHSkcn8AABjXD_0hiY812.png
注:成功后就可以登录配置grafana了
6、登录grafana 界面,http://ip:3000 默认用户和密码均为admin
http://s3.运维网.com/wyfs02/M02/7F/8A/wKioL1ch6eugUg-gAABP4-n30Fk948.png
在grafana上配置zabbix的数据源
http://blog.运维网.com/e/u261/themes/default/images/spacer.gifhttp://s2.运维网.com/wyfs02/M00/7F/8A/wKioL1ch6heSa2eOAAMvz8XanDk344.png
配置后添加item图形。
http://blog.运维网.com/e/u261/themes/default/images/spacer.gifhttp://s1.运维网.com/wyfs02/M01/7F/8C/wKiom1ch6W3jtfNPAASxJeUXygk691.png
就先这样吧。收工,透透气去。。
页:
[1]