Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
chmod +x scripts/dm-swarm-06.sh
./scripts/dm-swarm-06.sh
eval $(docker-machine env swarm-1)
echo "route:
group_by: [service]
receiver: 'slack'
repeat_interval: 1h
receivers:
- name: 'slack'
slack_configs:
- send_resolved: true
title: '[{{ .Status | toUpper }}] {{ .GroupLabels.service }} service is in danger!'
title_link: 'http://$(docker-machine ip swarm-1)/monitor/alerts'
text: '{{ .CommonAnnotations.summary}}'
api_url: 'https://hooks.slack.com/services/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'
" | docker secret create alert_manager_config -
DOMAIN=$(docker-machine ip swarm-1) \
docker stack deploy \
-c stacks/docker-flow-monitor-slack.yml \
monitor
docker service update \
--label-add com.df.alertIf=@service_mem_limit:0.1 \
go-demo_main
open "http://$(docker-machine ip swarm-1)/monitor/alerts"
docker service update \
--label-add com.df.alertIf=@service_mem_limit:0.8 \
go-demo_main
docker service create \
--name grafana \
--network proxy \
-p 3000 \
grafana/grafana:3.1.1
open "http://$(docker-machine ip swarm-1)/grafana"
docker-machine rm -f swarm-1 swarm-2 swarm-3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.