#!/bin/bash
init(){
yum install -y epel-*
yum install -y wget vim git unzip python-pip epel-release golang redis
pip install gunicorn
systemctl start redis
systemctl enable redis
systemctl stop firewalld
systemctl disable firewalld
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config
setenforce 0
}
mysql_install(){
#
yum install -y
yum install -y Percona-Server-server-56 Percona-Server-devel-56
service mysql start
mysqladmin -uroot password root123
}
falcon_pack() {
export GOROOT=/usr/lib/golang
export GOPATH=/home
mkdir -p $GOPATH/src/github.com/open-falcon
cd $GOPATH/src/github.com/open-falcon
git clone
cd $GOPATH/src/github.com/open-falcon/falcon-plus/scripts/mysql/db_schema/
mysql -h 127.0.0.1 -u root -proot123 < 1_uic-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 2_portal-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 3_dashboard-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 4_graph-db-schema.sql
mysql -h 127.0.0.1 -u root -proot123 < 5_alarms-db-schema.sql
cd $GOPATH/src/github.com/open-falcon/falcon-plus/
go get -v github.com/open-falcon/rrdlite
make all
make pack
}
falcon_install(){
export WORKSPACE=/home/work
mkdir -p $WORKSPACE
cd $GOPATH/src/github.com/open-falcon/falcon-plus/
tar -xzvf *.tar.gz -C $WORKSPACE
sed -i 's/root:/root:root123/g' /home/work/aggregator/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/graph/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/hbs/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/nodata/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/api/config/cfg.json
sed -i 's/root:/root:root123/g' /home/work/alarm/config/cfg.json
cd $WORKSPACE
./open-falcon start
}
falcon_dashboard(){
export FRONTSPACE=/home/front/open-falcon
mkdir -p $FRONTSPACE
cd $FRONTSPACE
git clone
yum groupinstall "Development tools" -y
yum install -y python-virtualenv python-devel openldap-devel openssl-devel libblockdev-crypto-devel
cd $FRONTSPACE/dashboard/
virtualenv ./env
./env/bin/pip install -r pip_requirements.txt
bash control start
#
#修改rrd/config.py
}
mymon:
go get -u github.com/open-falcon/mymon
cd $GOPATH/src/github.com/open-falcon/mymon
make
再配置IP就OK
mail
go get -v github.com/zzlyzq/mail-provider
cd $GOPATH/src/github.com/zzlyzq/mail-provider
go get
./control build
./control pack
mkdir -p /home/work/mail-provider
mv falcon-mail-provider-0.0.1.tar.gz /home/work/mail-provider
cd /home/work/mail-provider
tar zxvf falcon-mail-provider-0.0.1.tar.gz
vi cfg.json
{
"debug": true,
"http": {
"listen": "0.0.0.0:4000",
"token": ""
},
"smtp": {
"addr": "smtp.exmail.qq.com:587",
"username": "rdsys@123.com",
"password": "FEI",
"from": "rdsys@123.com"
}
}
./control start
./control tail
curl -d "tos=zheni@123.com&subject=xx&content=yy"
钉钉
微信
lvs:
yum update -y nss curl libcurl libnl3-devel libnl3
go get -v github.com/mesos-utility/lvs-metrics
cd $GOPATH/src/github.com/mesos-utility/lvs-metrics
./control build
./control pack
mkdir -p /home/work/lvs-metrics
mv lvs-metrics-v0.3.0.tar.gz /home/work/lvs-metrics
cd /home/work/lvs-metrics
./control start
mongomon
cd /home/work/
git clone .git
redis
进程数监控,端口
proc.num tags: name=haproxy
https://blog.csdn.net/cry1049208942/article/details/85264737
expressions
https://blog.kazaff.me/2016/08/10/Open-Falcon%E5%88%9D%E6%8E%A2/
视频
阅读(1342) | 评论(0) | 转发(0) |