唐僧还在拜佛求经路。  

1:环境信息、环境准备

linux amd64 (ubuntu server)

prometheus 2.15.1

 

 

 

2:二进制包安装,安装方法:

下载安装包,最新版本根据官方为准;(创建下载目录,以便安装过后清理掉)

cd /usr/local/

wget https://github.com/prometheus/prometheus/releases/download/v2.15.1/prometheus-2.15.1.linux-amd64.tar.gz

 

 

 

3:解压缩 prometheus-2.15.1.linux-amd64.tar.gz

tar -xvzf /usr/local/prometheus-2.15.1.linux-amd64.tar.gz && mv prometheus-2.15.1.linux-amd64 prometheus

 

 

4:压缩成功后,可以运行 version 检查运行环境是否正常

# ./prometheus --version
  prometheus, version 2.15.1 (branch: HEAD, revision: 8744510c6391d3ef46d8294a7e1f46e57407ab13)
  build user: root@4b1e33c71b9d
  build date: 20191225-01:04:15
  go version: go1.13.5

 

 

 

 

 

5:通过启动日志,可以看到 Prometheus Server 默认端口是9090

语法测试:./promtool check config prometheus.yml
启动:./prometheus --web.enable-lifecycle --config.file=prometheus.yml --web.external-url=http://192.168.152.137:9090/ --web.enable-admin-api
参数解释:
  --web.enable-lifecycle #开启热加载,热加载命令:curl -X POST http://192.168.152.137:9090/-/reload
  --web.external-url=http://192.168.152.137:9090/ #查看prometheus数据
  --web.enable-admin-api #配置consul选项

访问:http://IP:9090

 

 

 

 

 

 

 

后期文章接着还会更新,有问题也可以留言!

posted on 2020-03-30 15:57  唐僧还在拜佛求经路。  阅读(410)  评论(0编辑  收藏  举报