open-falcon初探(一)---安裝部署
簡介
官網:http://book.open-falcon.org/zh_0_2/
小米運維團隊出品開源監控軟體,截止目前在github上已經有了4000餘個星。
go語言寫的後端,python+flask語言寫的前端。
本人應用zabbix多年,藉此機會記錄下學習的過程。
open-falcon安裝:
使用編譯好的二進位制檔案方式安裝
centos 6.5
python 2.7.13
go1.11.5(https://golang.org/doc/install )
#環境準備 yum install -y redis yum install -y mysql-server 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 -u root -phoolai < 1_uic-db-schema.sql mysql -h 127.0.0.1 -u root -phoolai < 2_portal-db-schema.sql mysql -h 127.0.0.1 -u root -phoolai < 3_dashboard-db-schema.sql mysql -h 127.0.0.1 -u root -phoolai < 4_graph-db-schema.sql mysql -h 127.0.0.1 -u root -phoolai < 5_alarms-db-schema.sql #後端安裝: #下載編譯好的二進位制檔案: mkdir open-falcon && cd /data/open-falcon wget https://github.com/open-falcon/falcon-plus/releases/download/v0.2.1/open-falcon-v0.2.1.tar.gz grep -Ilr 3306./ | xargs -n1 -- sed -i 's/root:/real_user:real_password/g' #real_user和real_password修改為mysql的使用者名稱密碼 ./open-falcon start ./open-falcon check #前端安裝: git clone https://github.com/open-falcon/dashboard.git virtualenv ./env ./env/bin/pip install -r pip_requirements.txt -i https://pypi.douban.com/simple #在rrd/config.py修改配置檔案中關於mysql使用者密碼相關配置 bash control start #小提示:註冊賬號能夠被任何開啟dashboard頁面的人註冊, #所以當給相關的人註冊完賬號後,需要去關閉註冊賬號功能。 #只需要去修改api元件的配置檔案cfg.json,將signup_disable配置項修改為true,重#啟api即可。 #當需要給人開賬號的時候,再將配置選項改回去,用完再關掉即可。
agent安裝:
把agent和open-falcon打包傳到被監控機上
修改 agent/config/cfg.json 中的配置
{ "debug": true, "hostname": "期望的endpoint名字",###修改此行### "ip": "", "plugin": { "enabled": false, "dir": "./plugin", "git": "https://github.com/open-falcon/plugin.git", "logs": "./logs" }, "heartbeat": { "enabled": true, "addr": "open-falcon主機的ip地址:6030",###修改此行### "interval": 60, "timeout": 1000 }, "transfer": { "enabled": true, "addrs": [ "open-falcon主機的ip地址:8433"###修改此行### ], "interval": 60, "timeout": 1000 }, "http": { "enabled": true, "listen": ":1988", "backdoor": false }, "collector": { "ifacePrefix": ["eth", "em"], "mountPoint": [] }, "default_tags": { }, "ignore": { "cpu.busy": true, "df.bytes.free": true, "df.bytes.total": true, "df.bytes.used": true, "df.bytes.used.percent": true, "df.inodes.total": true, "df.inodes.free": true, "df.inodes.used": true, "df.inodes.used.percent": true, "mem.memtotal": true, "mem.memused": true, "mem.memused.percent": true, "mem.memfree": true, "mem.swaptotal": true, "mem.swapused": true, "mem.swapfree": true } }
./open-falcon start agent啟動