proofreading

This commit is contained in:
2022-02-27 21:34:35 +01:00
parent ac96fac378
commit 2aff89e590
6 changed files with 97 additions and 21 deletions

View File

@ -63,8 +63,10 @@ It consists on 2 scrapes job, use `targets` in order to indicate to Prometheus t
Finally create a `prometheus` stack in Portainer :
{{< highlight host="stack" file="prometheus" >}}
```yml
version: '3.7'
version: '3'
services:
@ -99,6 +101,8 @@ volumes:
data:
```
{{< /highlight >}}
The `private` network will serve us later for exporters. Next config are useful in order to control the DB usage, as metrics can go up very quickly :
| argument | description |
@ -150,6 +154,8 @@ It will take the node hostname and create an exploitable data metric for prometh
Next we'll edit our `prometheus` stack by expanding YML config with next 2 additional services :
{{< highlight host="stack" file="prometheus" >}}
```yml
#...
cadvisor:
@ -195,6 +201,8 @@ configs:
external: true
```
{{< /highlight >}}
Finally, add the 2 next jobs in previous Prometheus config file :
{{< highlight host="manager-01" file="/etc/prometheus/prometheus.yml" >}}
@ -268,8 +276,10 @@ sudo chown -R 472:472 /mnt/storage-pool/grafana
Next create new following `grafana` stack :
{{< highlight host="stack" file="grafana" >}}
```yml
version: '3.7'
version: '3'
services:
grafana:
@ -303,6 +313,8 @@ networks:
external: true
```
{{< /highlight >}}
Set proper `GF_DATABASE_PASSWORD` and deploy. Database migration should be automatic (don't hesitate to check inside pgAdmin). Go to <https://grafana.sw.dockerswarm.rocks> and login as admin / admin.
[![Grafana home](grafana-home.png)](grafana-home.png)
@ -382,6 +394,8 @@ GRANT PROCESS, REPLICATION CLIENT, SELECT ON *.* TO 'exporter'@'10.0.0.0/8';
Then we just have to expand the above `prometheus` stack description with 2 new exporter services, one for MySQL, and other for PostgreSQL :
{{< highlight host="stack" file="prometheus" >}}
```yml
#...
mysql-exporter:
@ -414,6 +428,8 @@ Then we just have to expand the above `prometheus` stack description with 2 new
#...
```
{{< /highlight >}}
Set proper `MYSQL_PASSWORD` and `POSTGRES_PASSWORD` environment variables and deploy the stack. Be sure that the 2 new services have started.
### Configure Prometheus