Last active
January 10, 2020 22:27
-
-
Save subicura/567dd9b3c0f4f809f138e654f8368bc4 to your computer and use it in GitHub Desktop.
docker-prom-stack.yml
This file contains 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: "3" | |
networks: | |
monitoring: | |
services: | |
cadvisor: | |
image: google/cadvisor:${CADVISOR_VERSION:-v0.26.1} | |
networks: | |
- monitoring | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock,readonly | |
- /:/rootfs | |
- /var/run:/var/run | |
- /sys:/sys | |
- /var/lib/docker/:/var/lib/docker | |
deploy: | |
mode: global | |
resources: | |
limits: | |
cpus: '0.10' | |
memory: 128M | |
reservations: | |
cpus: '0.10' | |
memory: 64M | |
node-exporter: | |
image: basi/node-exporter:${NODE_EXPORTER_VERSION:-latest} | |
networks: | |
- monitoring | |
volumes: | |
- /proc:/host/proc | |
- /sys:/host/sys | |
- /:/rootfs | |
- /etc/hostname:/etc/host_hostname | |
hostname: "{{.Node.ID}}" | |
environment: | |
HOST_HOSTNAME: /etc/host_hostname | |
command: --path.procfs "/host/proc" --path.sysfs /host/sys --collector.textfile.directory /etc/node-exporter/ --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|host|etc)($$|/)" | |
deploy: | |
mode: global | |
resources: | |
limits: | |
cpus: '0.10' | |
memory: 32M | |
reservations: | |
cpus: '0.10' | |
memory: 16M | |
docker-exporter: | |
image: basi/socat:${DOCKER_EXPORTER_VERSION:-v0.1.0} | |
networks: | |
- monitoring | |
deploy: | |
mode: global | |
resources: | |
limits: | |
cpus: '0.05' | |
memory: 6M | |
reservations: | |
cpus: '0.05' | |
memory: 4M | |
alertmanager: | |
image: basi/alertmanager:${ALERTMANAGER_VERSION:-v0.8.0} | |
networks: | |
- monitoring | |
# - logging | |
ports: | |
- "9093:9093" | |
environment: | |
SLACK_API: ${SLACK_API:-YOURTOKENGOESHERE} | |
LOGSTASH_URL: http://logstash:8080/ | |
command: -config.file=/etc/alertmanager/config.yml | |
deploy: | |
mode: replicated | |
replicas: 1 | |
resources: | |
limits: | |
cpus: '0.01' | |
memory: 32M | |
reservations: | |
cpus: '0.01' | |
memory: 16M | |
prometheus: | |
image: basi/prometheus-swarm:${PROMETHEUS_SWARM_VERSION:-latest} | |
ports: | |
- "9090" | |
networks: | |
- monitoring | |
command: -config.file=/etc/prometheus/prometheus.yml -storage.local.path=/prometheus -web.console.libraries=/etc/prometheus/console_libraries -web.console.templates=/etc/prometheus/consoles -alertmanager.url=http://alertmanager:9093 | |
deploy: | |
mode: replicated | |
replicas: 1 | |
resources: | |
limits: | |
cpus: '0.50' | |
memory: 1024M | |
reservations: | |
cpus: '0.50' | |
memory: 128M | |
grafana: | |
image: basi/grafana:${GRAFANA_VERSION:-4.4.3} | |
ports: | |
- "3000:3000" | |
networks: | |
- monitoring | |
environment: | |
GF_SECURITY_ADMIN_PASSWORD: ${GF_PASSWORD:-admin} | |
PROMETHEUS_ENDPOINT: http://prometheus:9090 | |
ELASTICSEARCH_ENDPOINT: ${ES_ADDRESS:-http://elasticsearch:9200} | |
ELASTICSEARCH_USER: ${ES_USERNAME} | |
ELASTICSEARCH_PASSWORD: ${ES_PASSWORD} | |
deploy: | |
mode: replicated | |
replicas: 1 | |
resources: | |
limits: | |
cpus: '0.50' | |
memory: 64M | |
reservations: | |
cpus: '0.50' | |
memory: 32M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
안녕하세요! 네트워크는 여러개 설정 가능합니다. 말씀하신데로 필요한 네트워크를 추가하시면 됩니다~