open-falcon初探(一)---安装部署

栏目: 数据库 · 发布时间: 7年前

内容简介:简介官网:小米运维团队出品开源监控软件,截止目前在github上已经有了4000余个星。

简介

官网: 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启动


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。

C#入门经典

C#入门经典

[美] Karli Watson、Christian Nagel / 齐立波、黄静 / 清华大学出版社 / 2008-12 / 118.00元

这是一本成就无数C#程序员的经典名著,厚而不“重”,可帮助您轻松掌握C#的各种编程知识,为您的职业生涯打下坚实的基础,《C#入门经典》自第1版出版以来,全球销量已经达数万册,在中国也有近8万册的销量,已经成为广大初级C#程序员首选的入门教程,也是目前国内市场上最畅销的C#专业店销书,曾两次被CSDN、《程序员》等机构和读者评选为“最受读者喜爱的十大技术开发类图书”!第4版面向C#2008和.NET......一起来看看 《C#入门经典》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

html转js在线工具
html转js在线工具

html转js在线工具

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具