Difference between revisions of "Prometheus docker compose example"
Jump to navigation
Jump to search
(Created page with " == See also == * {{docker-compose}} Category:Docker-compose") |
|||
| (2 intermediate revisions by one other user not shown) | |||
| Line 1: | Line 1: | ||
| + | * https://grafana.com/docs/grafana-cloud/quickstart/docker-compose-linux/ | ||
| + | |||
| + | 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" | ||
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]
docker-compose,docker-compose.yml: [services|volumes|networks|up|down|restart|logs|create|changelog|version|secrets|config|-v|-h|exec], docker-compose pull,Environment:, Docker-compose.yml examples,.env, release notes, expose:, docker-compose --env-file,services.deploy.resources
Advertising: