# Grafana-Loki-Minio ## Description This dokcer run stack grafana, loki, promtail, minio ### Container | Name | URL | Description | |:---|:---|:---| | -dns-tools-1 | - | container with dns tools (just use for debug)| | -proxy-1 | `https://` | nginx proxy | -minio-1 | UI: `https:///minio/ui`
API: `http://127.0.0.1:9000`| container minio server UI and API | | -grafana-1 | `https:///grafana` | grafana | | -minio-cli-1 | - | client minio | ## Requirements ### Certificats Create a folder named `/home/docker/certs` and copy your certificates into it. ```bash sudo mkdir -p /home/docker/certs ``` ### Variables All variables are described in the `.env.dist` file Copy the `.env.dist` file to `.env` and update it with values appropriate for your setup. ### Proxy (nginx) Create the folder where the ngnix config will be stored and copy the `config/nginx.conf` into it ```bash sudo mkdir -p /home/docker/nginx sudo cp ./config/default.conf /home/docker/nginx/. ``` ### Minio Create the folder where the minio data will be stored ```bash sudo mkdir -p /home/docker/minio ``` ### Minio client Create the folder where the minio client comfig will be stored ```bash sudo mkdir -p /home/docker/minio-cli ``` ### Grafana Create the folder where the grafana data will be stored ```bash sudo mkdir -p /home/docker/grafana ``` ### Prometheus Create the folder where the grafana data will be stored ```bash sudo mkdir -p /home/docker/prometheus ``` Create the folder where the prometheus data will be stored ```bash sudo mkdir -p /home/docker/prometheus-data ``` ## Run ```bash docker compose up -d ``` ## Config ### Minio client Create an alias ```bash docker exec -it -minio-cli-1 /bin/sh -c "mc alias set myminio http://minio:9000 " ``` Create prometheus metrics job ```bash docker exec -it -minio-cli-1 /bin/sh -c "mc admin prometheus generate myminio" ``` Copy the output into prometheus.yml ```yaml scrape_configs: - job_name: minio-job bearer_token: eyJhbGciOiJIUzUxMiIs..InR5cCI6IkpXVCJ9 metrics_path: /minio/v2/metrics/cluster scheme: http static_configs: - targets: ['minio:9000'] ``` Restart prometheus ```bash docker compose restart prometheus ``` Add dashboard ***13502 - MinIO Dashboard*** to grafana ### Prometheus #### grafana source `http://prometheus:9090` #### grafana dashboard 3662 - Prometheus 2.0 Overview ### Node exporter #### grafana dashboard 1860 - Node Exporter Full ## Access **dns-tools** ```bash docker exec -it -dns-tools /bin/bash ``` ```bash dig minio-server ping minio-server nslookup minio-server ``` **minio** `https:///minio/ui/` **minio-cli** ```bash docker exec -it -minio-cli-1 /bin/sh ``` **grafana** `https:///grafana/` **prometheus** `http://:9090` ## Sources ### Minio * https://github.com/Anagraph/minio-docker-config/blob/master/docker-compose.yaml * https://min.io/docs/minio/linux/integrations/setup-nginx-proxy-with-minio.html ### Grafana * https://grafana.com/docs/loki/latest/setup/install/docker/ * https://grafana.com/tutorials/run-grafana-behind-a-proxy/ ### Prometheus * https://mxulises.medium.com/simple-prometheus-setup-on-docker-compose-f702d5f98579 ## Changelog ### [1.1.0] - 2025-06-09 #### Added - prometheus container - node exporter container - grafana dashboard - 1860 - Node Exporter Full - 3662 - Prometheus 2.0 Overview - 13502 - MinIO Dashboard ### [1.0.0] - 2025-06-08 #### Added - init docker container - proxy with nginx - minio container - grafana container #### Project initialization - initialization by [GMo](mailto:gilles.mouchet@gmail.com)