- Necessário que tenha conhecimento básicos de Docker Engine e Docker Compose.
Baixando o projeto:
git clone https://github.com/vandocouto/Docker-Prometheus-V2.2.1.git
cd Docker-Prometheus-V2.2.1
Construindo as imagens:
docker build -f build-prometheus/Dockerfile -t prometheus:latest .
docker build -f build-alertmanager/Dockerfile -t alertmanager:latest .
Criando o volume (storage)
docker volume create --name=prometheus
Levantando os containers:
docker-compose up -d
├── build-alertmanager
│ ├── alertmanager.yml
│ ├── default.tmpl
│ ├── Dockerfile
│ ├── email.html
│ └── run.sh
├── build-prometheus
│ ├── alert.rules
│ ├── Dockerfile
│ └── prometheus.yml
├── docker-compose.yml
├── environment.env
└── README.md
Gráfico CPU LOAD
Alerta recebido no canal General do Slack
Alerta recebido no email (Relay configurado para o prometheus)
Alerta recebido no http://alertmanager:9093
Fonte: https://prometheus.io/docs/