单机部署open-falcon-v0.3

运维干货 2年前 (2022) 导航君
31 0 0

单机部署

环境部署

cd  /usr/local/src
yum install  redis
yum install  mysql-server   #mysql 可以编译安装

后端部署

cd /tmp/ && git clone https://github.com/open-falcon/falcon-plus.git 
cd /tmp/falcon-plus/scripts/mysql/db_schema/
mysql -h 127.0.0.1 -uroot -p密码 < 1_uic-db-schema.sql
mysql -h 127.0.0.1 -uroot -p密码 < 2_portal-db-schema.sql
mysql -h 127.0.0.1 -uroot -p密码 < 3_dashboard-db-schema.sql 
mysql -h 127.0.0.1 -uroot -p密码 < 4_graph-db-schema.sql 
mysql -h 127.0.0.1 -uroot -p密码 < 5_alarms-db-schema.sql
wget 下载包open-falcon-v0.3.tar.gz
mkdir /home/work/open-falcon/
tar -xf open-falcon-v0.3.tar.gz  -C /home/work/open-falcon/
cd  /home/work/open-falcon/
grep -Ilr 3306  ./ | xargs -n1 -- sed -i 's/root:/root:123456/g'
./open-falcon start
./open-falcon start agent
./open-falcon check

前端dashboard部署

cd  /home/work/open-falcon/
git clone https://github.com/open-falcon/dashboard.git
yum install -y python-virtualenv
yum install -y python-devel
yum install -y openldap-devel
yum install -y mysql-devel
yum groupinstall "Development tools"
cd $WORKSPACE/dashboard/
virtualenv ./env
./env/bin/pip install -r pip_requirements.txt -i https://pypi.douban.com/simple
配置文件:vim rrd/config.py

API_ADDR 表示后端api组件的地址

API_ADDR = "http://127.0.0.1:8080/api/v1"

根据实际情况,修改PORTAL_DB_*, 默认用户名为root,默认密码为""

根据实际情况,修改ALARM_DB_*, 默认用户名为root,默认密码为""

bash control start
bash control stop
bash control tail
浏览器打开:http://ip:8081
账号密码 :创建root即可

整合grafana大屏

说明:grafana最好用5.4以下的,亲测5.4(包含)以上的获取不了数据源

cd /home/work/open-falcon/
tar xf grafana-5.1.3.linux-x64.tar.gz 
ln -s grafana-5.1.3/  grafana
cd /home/work/open-falcon/grafana/bin ;nohup ./grafana-server &
cd /home/work/open-falcon/grafana/data/plugins/
git clone  https://github.com/hitripod/grafana-openfalcon-datasource 
./grafana-cli plugins install raintank-worldping-app
./grafana-cli plugins install fastweb-openfalcon-datasource
./grafana-cli plugins install grafana-piechart-panel
pkill grafana-server 
cd /home/work/open-falcon/grafana/bin ;nohup ./grafana-server &
浏览器打开:http://ip:3000
账号密码默认admin
版权声明:导航君 发表于 2022年6月12日 上午8:48。
转载请注明:单机部署open-falcon-v0.3 | 第八网址导航

相关文章

暂无评论

暂无评论...