Zabbix定制开发-Docker部署Prometheus

第一步:安装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
      Zabbix定制开发-Docker部署Prometheus
      浏览器输入192.168.1.142:9090
      Zabbix定制开发-Docker部署Prometheus

技术交流欢迎加入Q群:177428068

猜你喜欢

转载自blog.51cto.com/14483703/2557457