美文网首页
mips架构上安装prometheus

mips架构上安装prometheus

作者: 虾兵蟹将组合 | 来源:发表于2019-06-26 11:06 被阅读0次

1、安装go环境,并且配置好GOPATH

2、$ mkdir -p $GOPATH/src/github.com/prometheus

     $ cd $GOPATH/src/github.com/prometheus

    $ git clone https://github.com/prometheus/prometheus.git

3、修改代码,由于go源码在mips架构不支持unix.Infotiy*(),而prometheus的file service discovery是基于这个实现的,所以需要修改prometheus源码,就是去掉/prometheus/prometheus/discovery/file包以及相关的代码,代码修改如下:

--第一步:注释掉prometheus/CHANGELOG.md里的282行:

* [BUGFIX] discovery/file: fix logging #4178

--第二步:注释掉prometheus/config/config_test.go36行

--第三:注释掉prometheus/prometheus/discovery/config/config.go里的23行、40行、85-89行

--第四:注释掉prometheus/prometheus/discovery/manager.go里的34行,354-358行

--第五:注释掉prometheus/prometheus/cmd/promtool/main.go里的229-242行

4、$ cd prometheus

5、$ make build

6、$ ./prometheus --config.file=prometheus.yml

相关文章

网友评论

      本文标题:mips架构上安装prometheus

      本文链接:https://www.haomeiwen.com/subject/wswqcctx.html