centos6.5安装open-falcon
时间:2016-04-14 01:45来源:blog.51cto.com 作者:yanglinpei 的BLOG 举报 点击:次
环境准备
我们把相关组件编译成了二进制,方便大家直接使用,这些二进制只能跑在64位Linux上
国内用户点这里高速下载编译好的二进制版本
DOWNLOAD="https://github.com/open-falcon/of-release/releases/download/v0.1.0/open-falcon-v0.1.0.tar.gz"cd $WORKSPACEmkdir ./tmp#下载wget $DOWNLOAD -O open-falcon-latest.tar.gz#解压tar -zxf open-falcon-latest.tar.gz -C ./tmp/for x in `find ./tmp/ -name "*.tar.gz"`;do \ app=`echo $x|cut -d '-' -f2`; \ mkdir -p $app; \ tar -zxf $x -C $app; \done
==================== 安装绘图组件 =================
同时,请再次检查当前的工作目录设置:
+
export HOME=/home/work export WORKSPACE=$HOME/open-falcon mkdir -p $WORKSPACE 安装Transfer
transfer默认监听在:8433端口上,agent会通过jsonrpc的方式来push数据上来。
cd $WORKSPACE/transfer/ mv cfg.example.json cfg.json# 默认情况下(所有组件都在同一台服务器上),保持cfg.json不变即可# cfg.json中的各配置项,可以参考 https://github.com/open-falcon/transfer/blob/master/README.md# 如有必要,请酌情修改cfg.json# 启动transfer./control start# 校验服务,这里假定服务开启了6060的http监听端口。检验结果为ok表明服务正常启动。curl -s ":6060/health"#查看日志./control tail# 停止transfer./control stop 安装Agent每台机器上,都需要部署agent,agent会自动采集预先定义的各种采集项,每隔60秒,push到transfer。
cd $WORKSPACE/agent/ mv cfg.example.json cfg.json vim cfg.json - 修改 transfer这个配置项的enabled为 true,表示开启向transfer发送数据的功能 - 修改 transfer这个配置项的addr为:["127.0.0.1:8433"] (改地址为transfer组件的监听地址, 为列表形式,可配置多个transfer实例的地址,用逗号分隔)# 默认情况下(所有组件都在同一台服务器上),保持cfg.json不变即可# cfg.json中的各配置项,可以参考 https://github.com/open-falcon/agent/blob/master/README.md# 启动./control start# 查看日志./control tail 安装Graphgraph组件是存储绘图数据、历史数据的组件。transfer会把接收到的数据,转发给graph。
cd $WORKSPACE/graph/ mv cfg.example.json cfg.json# 默认情况下(所有组件都在同一台服务器上),保持cfg.json不变即可# cfg.json中的各配置项,可以参考 https://github.com/open-falcon/graph/blob/master/README.md# 启动./control start# 查看日志./control tail# 校验服务,这里假定服务开启了6071的http监听端口。检验结果为ok表明服务正常启动。curl -s ":6071/health" 安装Queryquery组件,绘图数据的查询接口,query组件收到用户的查询请求后,会从后端的多个graph,查询相应的数据,聚合后,再返回给用户。
cd $WORKSPACE/query/ mv cfg.example.json cfg.json# 默认情况下(所有组件都在同一台服务器上),保持cfg.json不变即可# cfg.json中的各配置项,可以参考 https://github.com/open-falcon/query/blob/master/README.md# touch graph_backends.txtecho "graph-00 127.0.0.1:6070" > graph_backends.txt 启动./control start# 查看日志./control tail 安装Dashboarddashboard是面向用户的查询界面,在这里,用户可以看到push到graph中的所有数据,并查看其趋势图。
Install dependency
yum install -y python-virtualenv mysql-devel # run as rootcd $WORKSPACE/dashboard/ virtualenv ./env ./env/bin/pip install -r pip_requirements.txt