Created
February 1, 2019 21:30
-
-
Save moosh3/2b42597135709abdf09470cb27bf9b33 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2.1' | |
services: | |
nodeexporter: | |
image: prom/node-exporter:v0.17.0 | |
container_name: nodeexporter | |
user: root | |
privileged: true | |
volumes: | |
- /proc:/host/proc:ro | |
- /sys:/host/sys:ro | |
- /:/rootfs:ro | |
command: | |
- '--path.procfs=/host/proc' | |
- '--path.rootfs=/rootfs' | |
- '--path.sysfs=/host/sys' | |
- '--collector.filesystem.ignored-mount-points=^/(sys|proc|dev|host|etc)($$|/)' | |
restart: unless-stopped | |
ports: | |
- 9100:9100 | |
network_mode: host | |
labels: | |
org.label-schema.group: "monitoring" | |
prometheus: | |
image: prom/prometheus:v2.7.1 | |
container_name: prometheus | |
volumes: | |
- ./prometheus/:/etc/prometheus/ | |
- prometheus_data:/prometheus | |
command: | |
- '--config.file=/etc/prometheus/prometheus.yml' | |
- '--storage.tsdb.path=/prometheus' | |
- '--web.console.libraries=/etc/prometheus/console_libraries' | |
- '--web.console.templates=/etc/prometheus/consoles' | |
- '--storage.tsdb.retention.time=200h' | |
- '--web.enable-lifecycle' | |
restart: unless-stopped | |
expose: | |
- 9090 | |
networks: | |
- monitor-net | |
labels: | |
org.label-schema.group: "monitoring" | |
alertmanager: | |
image: prom/alertmanager:v0.16.1 | |
container_name: alertmanager | |
volumes: | |
- ./alertmanager/:/etc/alertmanager/ | |
command: | |
- '--config.file=/etc/alertmanager/config.yml' | |
- '--storage.path=/alertmanager' | |
restart: unless-stopped | |
expose: | |
- 9093 | |
networks: | |
- monitor-net | |
labels: | |
org.label-schema.group: "monitoring" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment