install

# set $GOPATH and $GOROOT

mkdir -p $GOPATH/src/github.com/open-falcon
cd $GOPATH/src/github.com/open-falcon
git clone https://github.com/open-falcon/mymon.git

cd mymon
go get ./...
go build -o mymon

echo '* * * * * cd $GOPATH/src/github.com/open-falcon/mymon && ./mymon -c etc/mon.cfg' > /etc/cron.d/mymon

config

    [default]
    log_file=mymon.log # 日志路径和文件名
    # Panic 0
    # Fatal 1
    # Error 2
    # Warn 3
    # Info 4
    # Debug 5
    log_level=4 # 日志级别

    falcon_client=http://127.0.0.1:1988/v1/push # falcon agent连接地址

    #自定义endpoint
    endpoint=127.0.0.1 #若不设置则使用OS的hostname

    [mysql]
    user=root # 数据库用户名
    password= # 数据库密码
    host=127.0.0.1 # 数据库连接地址
    port=3306 # 数据库端口

下载

wget http://ops:123123@soft2.ops.ac.cn:78/openfalcon/plugins/mymon.tar.gz

定时任务

* * * * * cd /opt/xx/falcon/agent/falcon-plugins/ && ./mymon -c mon.cfg
Copyright © opschina.org 2017 with zzlyzq@gmail.com all right reserved,powered by Gitbook该文件修订时间: 2017-07-11 11:32:48

results matching ""

    No results matching ""