Merge branch 'LeoWinterDE-version-2' into version-2
Mereged the auto restart policy to services: Prometheus, node-exporter, and cAdvisor. Grafana is not required to maintain monitoring.
This commit is contained in:
commit
b186431c15
10
README.md
10
README.md
@ -17,7 +17,7 @@ Once configurations are done let's start it up. From the /prometheus project dir
|
|||||||
$ docker-compose up -d
|
$ docker-compose up -d
|
||||||
|
|
||||||
|
|
||||||
That's it. docker-compose builds the entire Grafa and Prometheus stack automagically.
|
That's it. docker-compose builds the entire Grafana and Prometheus stack automagically.
|
||||||
|
|
||||||
The Grafana Dashboard is now accessible via: `http://<Host IP Address>:3000` for example http://192.168.10.1:3000
|
The Grafana Dashboard is now accessible via: `http://<Host IP Address>:3000` for example http://192.168.10.1:3000
|
||||||
|
|
||||||
@ -41,8 +41,8 @@ Slack configuration - `alertmanager/config.yml`
|
|||||||
The Slack configuration requires to build a custom integration.
|
The Slack configuration requires to build a custom integration.
|
||||||
* Open your slack team in your browser `https://<your-slack-team>.slack.com/apps`
|
* Open your slack team in your browser `https://<your-slack-team>.slack.com/apps`
|
||||||
* Click build in the upper right corner
|
* Click build in the upper right corner
|
||||||
* Make a Custom integration
|
* Choose Incoming Web Hooks link under Send Messages
|
||||||
* Choose Incoming Web Hooks
|
* Click on the "incoming webhook integration" link
|
||||||
* Select which channel
|
* Select which channel
|
||||||
* Click on Add Incoming WebHooks integration
|
* Click on Add Incoming WebHooks integration
|
||||||
* Copy the Webhook URL into the `alertmanager/config.yml` URL section
|
* Copy the Webhook URL into the `alertmanager/config.yml` URL section
|
||||||
@ -56,7 +56,7 @@ A quick test for your alerts is to stop a service. Stop the node_exporter contai
|
|||||||
|
|
||||||
High load test alert - `docker run --rm -it busybox sh -c "while true; do :; done"`
|
High load test alert - `docker run --rm -it busybox sh -c "while true; do :; done"`
|
||||||
|
|
||||||
Let this run for a few minutes and you will notice the load alert appear.
|
Let this run for a few minutes and you will notice the load alert appear. Then Ctrl+C to stop this container.
|
||||||
|
|
||||||
## Install Dashboard
|
## Install Dashboard
|
||||||
I created a Dashboard template which is available on [Grafana Docker Dashboard](https://grafana.net/dashboards/179). Simply download the dashboard and select from the Grafana menu -> Dashboards -> Import
|
I created a Dashboard template which is available on [Grafana Docker Dashboard](https://grafana.net/dashboards/179). Simply download the dashboard and select from the Grafana menu -> Dashboards -> Import
|
||||||
@ -99,4 +99,4 @@ Several projects utilize this Prometheus stack. Here's the list of projects:
|
|||||||
edit file `docker-compose.yml` change `node.hostname = <hostname where alertmanager config file in>` to your swarm node name for both `alertmanager` and `prometheus`
|
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
|
docker stack deploy -c docker-compose.yml monitor
|
||||||
```
|
```
|
||||||
|
@ -30,6 +30,7 @@ services:
|
|||||||
- cadvisor
|
- cadvisor
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
restart: always
|
||||||
deploy:
|
deploy:
|
||||||
placement:
|
placement:
|
||||||
constraints:
|
constraints:
|
||||||
@ -46,6 +47,7 @@ services:
|
|||||||
- 9100
|
- 9100
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
restart: always
|
||||||
deploy:
|
deploy:
|
||||||
alertmanager:
|
alertmanager:
|
||||||
image: prom/alertmanager
|
image: prom/alertmanager
|
||||||
@ -55,6 +57,7 @@ services:
|
|||||||
- ./alertmanager/:/etc/alertmanager/
|
- ./alertmanager/:/etc/alertmanager/
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
restart: always
|
||||||
command:
|
command:
|
||||||
- '-config.file=/etc/alertmanager/config.yml'
|
- '-config.file=/etc/alertmanager/config.yml'
|
||||||
- '-storage.path=/alertmanager'
|
- '-storage.path=/alertmanager'
|
||||||
@ -73,6 +76,7 @@ services:
|
|||||||
- 8080
|
- 8080
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
restart: always
|
||||||
deploy:
|
deploy:
|
||||||
mode: global
|
mode: global
|
||||||
|
|
||||||
@ -88,4 +92,4 @@ services:
|
|||||||
- config.monitoring
|
- config.monitoring
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
- front-tier
|
- front-tier
|
||||||
|
Loading…
Reference in New Issue
Block a user