Difference between revisions of "Prometheus docker compose example"

From wikieduonline
Jump to navigation Jump to search
 
Line 7: Line 7:
 
     image: prom/prometheus:latest
 
     image: prom/prometheus:latest
 
     container_name: prometheus
 
     container_name: prometheus
     volumes:
+
     [[volumes:]]
 
       - ./prometheus:/etc/prometheus
 
       - ./prometheus:/etc/prometheus
 
       - prometheus_data:/prometheus
 
       - prometheus_data:/prometheus

Latest revision as of 06:09, 13 February 2023


services:

 prometheus:
   image: prom/prometheus:latest
   container_name: prometheus
   volumes:
     - ./prometheus:/etc/prometheus
     - prometheus_data:/prometheus
   command:
     - '--config.file=/etc/prometheus/prometheus.yml'
     - '--web.console.libraries=/etc/prometheus/console_libraries'
     - '--web.console.templates=/etc/prometheus/consoles'
     - '--storage.tsdb.path=/prometheus'
     - '--storage.tsdb.retention.time=200h'
     - '--web.enable-lifecycle'
   restart: unless-stopped
   expose:
     - 9090
   networks:
     - monitor-net
   labels:
     org.label-schema.group: "monitoring"


See also[edit]

Advertising: