Install the following
- Docker
- Colima (Linux/Mac)
- Nginx
- Kubernetes
- Ansible / Chef
- Terraform
- Ruby on Rails
- Springboot
tik@tik-1tb:~/Desktop/SRE$ cat monitoring-stack.yml
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- "8080:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
- monitoring
nginx-exporter:
image: nginx/nginx-prometheus-exporter:latest
container_name: nginx-exporter
command: ["-nginx.scrape-uri", "http://nginx:80/stub_status"]
ports:
- "9113:9113"
depends_on:
- nginx
networks:
- monitoring
prometheus:
image: prom/prometheus:latest
container_name: prometheus
ports:
- "9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--web.enable-lifecycle"
networks:
- monitoring
mimir:
image: grafana/mimir:latest
container_name: mimir
command:
- "-target=all"
- "-config.expand-env=true"
- "-server.http-listen-port=9009"
- "-auth.multitenancy-enabled=false"
ports:
- "9009:9009"
networks:
- monitoring
# mimir:
# image: grafana/mimir:latest
# container_name: mimir
# ports:
# - "9009:9009"
# command: ["-config.expand-env=true"]
# networks:
# - monitoring
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
depends_on:
- prometheus
- mimir
networks:
- monitoring
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
networks:
monitoring:
driver: bridge
Prometheus and Grafana with docker compose
Compose file here:
Verify Docker Compose UP

Verify Prometheus

Verify Grafana

Setup Prometheus on Grafana

Confirm Prometheus in Grafana

Grafana admin

Reconfirm Docker Compose Up with Mimir

Checking Targets from Prom

Check if mimir is healthy
curl http://localhost:9009/prometheus/api/v1/status/buildinfo