falcon-agent arm架构 执行程序生成

  1. 安装 golang [1.4+]
    yum install golang
  2. 下载 falcon 文件,以及相关部署 GOPATH是go语言运行的环境,go 命令时的程序路径就是此路径
    export GOPATH=/root/go
    mkdir -p $GOPATH/src/github.com/open-falcon
    cd $GOPATH/src/github.com/open-falcon
    git clone https://github.com/open-falcon/falcon-plus.git
    cd falcon-plus/modules/agent
    go get
  3. 编译
    部署交叉编译工具链 [arm-2013.11]
    arm-linux-gnueabi-gcc -v
[CentOS]安装软件:/lib/ld-linux.so.2: bad ELF interpreter 解决
bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
解决办法:yum install glibc.i686
参考链接:https://blog.csdn.net/orangleliu/article/details/8869626
CGO_ENABLED=1 GOOS=linux GOARCH=arm CC=arm-linux-gnueabi-gcc go build
  1. 打包 falcon-agent
    打包 agent,cfg.json 两个文件

  2. 运行 falcon-agent
    修改 cfg.json hostname:必须唯一

{
	"debug": true,
	"hostname": "parkin",
	"ip": "",
	"plugin": {
		"enabled": false,
		"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"],
		"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
	}
}
./agent -c cfg.json
	可能缺少 arm-linux-gnueabi-gcc 环境的链接文件 ld-linux.so,以及相关依赖库

借鉴链接:https://yq.aliyun.com/articles/437196

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值