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*
|
*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:
|
volumes:
|
||||||
prometheus_data: {}
|
prometheus_data: {}
|
||||||
@ -6,9 +6,7 @@ volumes:
|
|||||||
|
|
||||||
networks:
|
networks:
|
||||||
front-tier:
|
front-tier:
|
||||||
driver: bridge
|
|
||||||
back-tier:
|
back-tier:
|
||||||
driver: bridge
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
prometheus:
|
prometheus:
|
||||||
@ -32,7 +30,10 @@ services:
|
|||||||
- cadvisor
|
- cadvisor
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
deploy:
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.hostname == <hostname where the prometheus config file in>
|
||||||
node-exporter:
|
node-exporter:
|
||||||
container_name: node-exporter
|
container_name: node-exporter
|
||||||
image: prom/node-exporter
|
image: prom/node-exporter
|
||||||
@ -45,6 +46,7 @@ services:
|
|||||||
- 9100
|
- 9100
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
deploy:
|
||||||
alertmanager:
|
alertmanager:
|
||||||
image: prom/alertmanager
|
image: prom/alertmanager
|
||||||
ports:
|
ports:
|
||||||
@ -56,7 +58,10 @@ services:
|
|||||||
command:
|
command:
|
||||||
- '-config.file=/etc/alertmanager/config.yml'
|
- '-config.file=/etc/alertmanager/config.yml'
|
||||||
- '-storage.path=/alertmanager'
|
- '-storage.path=/alertmanager'
|
||||||
|
deploy:
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.hostname == <hostname where alertmanager config file in>
|
||||||
cadvisor:
|
cadvisor:
|
||||||
image: google/cadvisor
|
image: google/cadvisor
|
||||||
volumes:
|
volumes:
|
||||||
@ -68,6 +73,8 @@ services:
|
|||||||
- 8080
|
- 8080
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
deploy:
|
||||||
|
mode: global
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana
|
image: grafana/grafana
|
||||||
@ -81,4 +88,4 @@ services:
|
|||||||
- config.monitoring
|
- config.monitoring
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
- front-tier
|
- front-tier
|
Loading…
Reference in New Issue
Block a user