简介
Prometheus基于Golang编写,编译后的软件包,不依赖于任何的第三方依赖。只需要下载对应平台的二进制包,解压并且添加基本的配置即可正常启动Prometheus Server
Prometheus安装
Prometheus官网下载对应软件包
https://prometheus.io/download/
下载对应平台的软件包到服务器
以2.11.1版本,Linux服务器为例
#下载软件包
wget https://github.com/prometheus/prometheus/releases/download/v2.11.1/prometheus-2.11.1.linux-amd64.tar.gz
#解压软件包
tar -zxvf prometheus-2.11.1.linux-amd64.tar.gz
可以将软件包移动到服务器存放软件的目录,并进入目录
mv prometheus-2.11.1.linux-amd64 /usr/local/prometheus
cd /usr/local/prometheus
默认配置为9090端口,可以通过修改prometheus.yml文件,修改配置
vim prometheus.yml
scrape_configs:
# The job name is added as a l