Grafana3.1.0安装步骤
来源:互联网 发布:one域名备案 编辑:程序博客网 时间:2024/05/22 02:26
下载grafana以及安装
Zabbix plugin for Grafana官网给出了rpm和源码包的安装方法
sudo yuminstall https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1468321182.x86_64.rpm
# ... configure your options in /etc/grafana/grafana.ini then
sudo systemctl start grafana-server
wget https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.0-1468321182.linux-x64.tar.gztar -zxvf grafana-3.1.0-1468321182.linux-x64.tar.gz
cd grafana-3.1.0-1468321182
cp conf/sample.ini conf/custom.ini
# make changes to conf/custom.ini then start grafana-server
./bin/grafana-server
两种安装方法我都试了,但是在国内访问官网很卡慢,下载也是非常的慢。后面我是在网上找的rpm包,成功安装grafana。(我已经将rpm包上传到我的资源中,免费提供给大家下载)
rpm -ivh grafana-3.1.1,x86_64.rpm
1、安装garfana-zabbix插件
官方网站:https://github.com/alexanderzobnin/grafana-zabbix
官网:http://docs.grafana-zabbix.org/installation/
[使用grafana-cli工具安装]
获取可用插件列表
grafana-cli plugins list-remote
安装zabbix插件
grafana-cli plugins install alexanderzobnin-zabbix-app
安装插件完成之后重启garfana服务
service grafana-server restart
使用grafana-zabbix-app源,其中包含最新版本的插件
cd /var/lib/grafana/plugins/
克隆grafana-zabbix-app插件项目到当前目录
git clone https://github.com/alexanderzobnin/grafana-zabbix-ap
注:如果没有git,请先安装git
yum install –y git
插件安装完成重启garfana服务
service grafana-server restart
####################################################
注:通过这种方式,可以很容易升级插件
cd /var/lib/grafana/plugins/grafana-zabbix-app
git pull
service grafana-server restart
##################################################
[使用源码包安装]
源码安装需要NodeJS,npm和Grunt支持
git clone https://github.com/alexanderzobnin/grafana-zabbix.git
cd grafana-zabbix
npm install
npm install -g grunt-cli
#########################################################
系统没有安装npm命令Centos上面直接yum安装就可以了,前提是要启用了EPEL软件库
yum install -y npm
#########################################################
grunt
插件将建成dist/目录。然后你可以将它复制到你的grafana插件目录或在grafana配置文件中指定编译插件的路径
[plugin.zabbix]
path = /home/your/clone/dir/grafana-zabbix/dist
如果需要更新,执行下面命令
git pull
Grunt
重启grafana服务
service grafana-server restart
systemctl restart grafana-server
grafana-server部分默认的目录和操作命令
#######################################################################
Package details
Installs binary to /usr/sbin/grafana-server
Copies init.d script to /etc/init.d/grafana-server
Installs default file (environment vars) to /etc/sysconfig/grafana-server
Copies configuration file to /etc/grafana/grafana.ini
Installs systemd service (if systemd is available) name grafana-server.service
The default configuration uses a log file at /var/log/grafana/grafana.log
The default configuration specifies an sqlite3 database at /var/lib/grafana/grafana.db
Start the server (via systemd)
$ systemctl daemon-reload
$ systemctl start grafana-server
$ systemctl status grafana-server
To configure the Grafana server to start at boot time:
$ sudo /sbin/chkconfig --add grafana-server
Enable the systemd service to start at boot
sudo systemctl enable grafana-server.service
####################################################################
2、测试zabbix-API
[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.21.250/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}
测试成功,可以登录配置grafana了。
在发表本篇文章之前我已经将grafana如何使用的文档发布,赶紧去看看吧。
http://blog.csdn.net/tony_bo/article/details/54095616
- Grafana3.1.0安装步骤
- Grafana3.1.0的使用
- spark2.1.0安装步骤
- 安装步骤
- 1.0 windows10系统安装步骤(1)
- myeclipse2016-1.0的安装及破解步骤
- Hadoop安装-安装步骤
- MYSQL安装步骤(免安装步骤)
- SCO5.0.5安装步骤
- FreeBSD 安装步骤
- SMS2003安装详细步骤
- cvsnt安装步骤
- VMware安装系统步骤
- Roller的安装步骤
- gentoo安装步骤整理
- SMS2003安装详细步骤
- VSTO 安装步骤
- 安装JPetStore详细步骤
- 操作Cassandra(8)-安全性
- Android 系列 2.6在Android中创建Splash屏幕
- redis 常用命令
- 【Maven学习】Maven打包生成普通jar包、可运行jar包、包含所有依赖的jar包
- ROSCon
- Grafana3.1.0安装步骤
- unutun 内核更换
- 从本科到研究生,看大疆工程师给你定制的机器人学习计划
- Eclipse显示行号的三种方法
- react学习总结-梳理
- Hive UDF 手册
- 关于cocos2dx在安卓编译时.so文件被删除问题
- STM32-如何使用引脚复用功能输出PWM
- 股票入门基础知识24:债务股权比率