Merge branch 'llitfkitfk-swarm-mode' into version-2
Merging the Swarm support
This commit is contained in:
commit
cb704e380b
@ -94,3 +94,9 @@ Several projects utilize this Prometheus stack. Here's the list of projects:
|
||||
|
||||
*Have an intersting Project which use this Repo? Submit yours to the list*
|
||||
|
||||
## Swarm mode Configuration
|
||||
|
||||
edit file `docker-compose.yml` change `node.hostname = <hostname where alertmanager config file in>` to your swarm node name for both `alertmanager` and `prometheus`
|
||||
```
|
||||
docker stack deploy -c docker-compose.yml monitor
|
||||
```
|
@ -1,4 +1,4 @@
|
||||
version: '2'
|
||||
version: '3'
|
||||
|
||||
volumes:
|
||||
prometheus_data: {}
|
||||
@ -6,9 +6,7 @@ volumes:
|
||||
|
||||
networks:
|
||||
front-tier:
|
||||
driver: bridge
|
||||
back-tier:
|
||||
driver: bridge
|
||||
|
||||
services:
|
||||
prometheus:
|
||||
@ -32,7 +30,10 @@ services:
|
||||
- cadvisor
|
||||
networks:
|
||||
- back-tier
|
||||
|
||||
deploy:
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == <hostname where the prometheus config file in>
|
||||
node-exporter:
|
||||
container_name: node-exporter
|
||||
image: prom/node-exporter
|
||||
@ -45,6 +46,7 @@ services:
|
||||
- 9100
|
||||
networks:
|
||||
- back-tier
|
||||
deploy:
|
||||
alertmanager:
|
||||
image: prom/alertmanager
|
||||
ports:
|
||||
@ -56,7 +58,10 @@ services:
|
||||
command:
|
||||
- '-config.file=/etc/alertmanager/config.yml'
|
||||
- '-storage.path=/alertmanager'
|
||||
|
||||
deploy:
|
||||
placement:
|
||||
constraints:
|
||||
- node.hostname == <hostname where alertmanager config file in>
|
||||
cadvisor:
|
||||
image: google/cadvisor
|
||||
volumes:
|
||||
@ -68,6 +73,8 @@ services:
|
||||
- 8080
|
||||
networks:
|
||||
- back-tier
|
||||
deploy:
|
||||
mode: global
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana
|
||||
@ -81,4 +88,4 @@ services:
|
||||
- config.monitoring
|
||||
networks:
|
||||
- back-tier
|
||||
- front-tier
|
||||
- front-tier
|
Loading…
Reference in New Issue
Block a user