歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> 學習Linux >> centos6.5安裝open-falcon

centos6.5安裝open-falcon

日期:2017/3/6 9:42:48   编辑:學習Linux

centos6.5安裝open-falcon


centos6.5安裝open-falcon


  1. 環境准備

安裝redis

yuminstall-yredis

安裝mysql

yuminstall-ymysql-server

創建工作目錄

exportHOME=/home/workexportWORKSPACE=$HOME/open-falconmkdir-p$WORKSPACEcd$WORKSPACE

初始化mysql表結構

#open-falcon所有組件都無需root賬號啟動,推薦使用普通賬號安裝,提升安全性。此處我們使用普通賬號:work來安裝部署所有組件#當然了,使用yum安裝依賴的一些lib庫的時候還是要有root權限的。gitclonehttps://github.com/open-falcon/scripts.gitcd./scripts/mysql-hlocalhost-uroot--password=""<db_schema/graph-db-schema.sqlmysql-hlocalhost-uroot--password=""<db_schema/dashboard-db-schema.sqlmysql-hlocalhost-uroot--password=""<db_schema/portal-db-schema.sqlmysql-hlocalhost-uroot--password=""<db_schema/links-db-schema.sqlmysql-hlocalhost-uroot--password=""<db_schema/uic-db-schema.sql

下載編譯好的組件

我們把相關組件編譯成了二進制,方便大家直接使用,這些二進制只能跑在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-Oopen-falcon-latest.tar.gz#解壓tar-zxfopen-falcon-latest.tar.gz-C./tmp/forxin`find./tmp/-name"*.tar.gz"`;do\app=`echo$x|cut-d'-'-f2`;\mkdir-p$app;\tar-zxf$x-C$app;\done

==================== 安裝繪圖組件 =================

同時,請再次檢查當前的工作目錄設置:

+

exportHOME=/home/workexportWORKSPACE=$HOME/open-falconmkdir-p$WORKSPACE

安裝Transfer

transfer默認監聽在:8433端口上,agent會通過jsonrpc的方式來push數據上來。

cd$WORKSPACE/transfer/mvcfg.example.jsoncfg.json#默認情況下(所有組件都在同一台服務器上),保持cfg.json不變即可#cfg.json中的各配置項,可以參考https://github.com/open-falcon/transfer/blob/master/README.md#如有必要,請酌情修改cfg.json#啟動transfer./controlstart#校驗服務,這裡假定服務開啟了6060的http監聽端口。檢驗結果為ok表明服務正常啟動。curl-s"http://127.0.0.1:6060/health"#查看日志./controltail#停止transfer./controlstop

安裝Agent

每台機器上,都需要部署agent,agent會自動采集預先定義的各種采集項,每隔60秒,push到transfer。

cd$WORKSPACE/agent/mvcfg.example.jsoncfg.jsonvimcfg.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#啟動./controlstart#查看日志./controltail

安裝Graph

graph組件是存儲繪圖數據、歷史數據的組件。transfer會把接收到的數據,轉發給graph。

cd$WORKSPACE/graph/mvcfg.example.jsoncfg.json#默認情況下(所有組件都在同一台服務器上),保持cfg.json不變即可#cfg.json中的各配置項,可以參考https://github.com/open-falcon/graph/blob/master/README.md#啟動./controlstart#查看日志./controltail#校驗服務,這裡假定服務開啟了6071的http監聽端口。檢驗結果為ok表明服務正常啟動。curl-s"http://127.0.0.1:6071/health"

安裝Query

query組件,繪圖數據的查詢接口,query組件收到用戶的查詢請求後,會從後端的多個graph,查詢相應的數據,聚合後,再返回給用戶。

cd$WORKSPACE/query/mvcfg.example.jsoncfg.json#默認情況下(所有組件都在同一台服務器上),保持cfg.json不變即可#cfg.json中的各配置項,可以參考https://github.com/open-falcon/query/blob/master/README.md#touchgraph_backends.txtecho"graph-00127.0.0.1:6070">graph_backends.txt啟動./controlstart#查看日志./controltail

安裝Dashboard

dashboard是面向用戶的查詢界面,在這裡,用戶可以看到push到graph中的所有數據,並查看其趨勢圖。

Install dependency

yuminstall-ypython-virtualenvmysql-devel#runasrootcd$WORKSPACE/dashboard/virtualenv./env./env/bin/pipinstall-rpip_requirements.txt

Configuration

#config的路徑為$WORKSPACE/dashboard/rrd/config.py,裡面有數據庫相關的配置信息,如有必要,請修改。默認情況下(所有組件都在同一台服務器上),保持默認配置即可#數據庫表結構初始化,請參考前面的環境准備階段

啟動

./controlstart-->gotohttp://127.0.0.1:8081

查看日志

./controltail

停止

./controlstop

http://xxxxxx/Linuxjc/1134369.html TechArticle

Copyright © Linux教程網 All Rights Reserved