Open-Falcon第三步安装Agent (小米开源互联网企业级监控系统)

安装Agent

每台机器上,都需要部署agent,agent会自动采集预先定义的各种采集项,每隔60秒,push到transfer。

cd $WORKSPACE/agent/
mv cfg.example.json cfg.json

vim cfg.json

    "debug": true,
    "hostname": "",
    "ip": "",
    "plugin": {
        "enabled": true,
        "dir": "./plugin",
        "git": "https://github.com/open-falcon/plugin.git",
        "logs": "./logs"
    },
    "heartbeat": {
        "enabled": true,
        "addr": "127.0.0.1:6030",
        "interval": 60,
        "timeout": 1000
    },
    "transfer": {
        "enabled": true,
        "addrs": [
            "127.0.0.1:8433",
            "127.0.0.1:8433"
        ],
        "interval": 60,
        "timeout": 1000
    },
    "http": {
        "enabled": true,
        "listen": ":1988",
        "backdoor": false
    },
    "collector": {
        "ifacePrefix": ["eth", "em"]
    },
    "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
    }
}

#修改 transfer这个配置项的enabled为 true,表示开启向transfer发送数据的功能

#修改 transfer这个配置项的addr为:["127.0.0.1:8433"] (改地址为transfer组件的监听地址, 为列表形式,可配置多个transfer实例的地址,用逗号分隔)

# 默认情况下(所有组件都在同一台服务器上),保持cfg.json不变即可

# 启动

./control start

# 查看日志

./control tail

# 停止

./control stop

#命令参数build|pack|packbin|start|stop|restart|status|tail

文章来自:http://www.cnblogs.com/love19791125/p/5336037.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3