第一步:安装docker
yum install -y docker-io
第二步:下载镜像
docker pull prom/prometheus
第三步:启动prometheus
mkdir /tmp/prometheus
cd /tmp/prometheus/
vim prometheus.yml
Prometheus.yml里面的内容如下:
global:
scrape_interval: 60s
evaluation_interval: 60s
scrape_configs:
- job_name: prometheus
static_configs:
- targets: [‘localhost:9090‘]
labels:
instance: prometheus
启动prometheus
docker run -d \
-p 9090:9090 \
-v /tmp/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus
浏览器输入192.168.1.142:9090
技术交流欢迎加入Q群:177428068
Zabbix定制开发-Docker部署Prometheus
原文:https://blog.51cto.com/14483703/2557457