Prometheus-07 Docker-compose のインストールと構成 prometheus と CPU/メモリ使用率分析の予備分析

docker-compose 構成

docker-compose の構成とインストールについては、私のこのメモを参照してください: Docker-compose インストール構成の説明

docker-compose.yml 構成ファイルを作成する

version: '3'

services:
  prometheus:
    image: prom/prometheus:v2.30.3
    container_name: prometheus
    deploy:
      resources:
        limits:
          cpus: '0.8'
          memory: 12G
    ports:
      - 9090:9090
    privileged: true
    volumes:
      - /data/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
      - /data/prometheus/data:/prometheus
      - /app/ca/server/server.crt:/etc/prometheus/server.crt
      - /app/ca/server/server.key:/etc/prometheus/server.key
      - /app/ca/root/ca.crt:/etc/prometheus/ca.crt
      - /data/prometheus/rules:/etc/prometheus/rules
      - /data/prometheus/web-config.yml:/etc/prometheus/web-config.yml
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
   

おすすめ

転載: blog.csdn.net/huanglu0314/article/details/131353971