Running MinIO Prometheus Exporter 
This recipe explains how to run a MinIO Prometheus exporter.
1. Prerequisites
2. Running the exporter
Once the MinIO server starts there are two ways to run the exporter, via building the binaries or using the docker image.
Run the exporter using the binaries
make
./minio_exporter [flags]
| Flag | Description | Default |
|---|---|---|
| version | Print version number and leave | |
| web.listen-address | The address to listen on to expose metrics. | :9290 |
| web.telemetry-path | The listening path for metrics. | /metrics |
| minio.server | The URL of the minio server. Use HTTPS if MinIO accepts secure connections only. | http://localhost:9000 |
| minio.access-key | The value of the MinIO access key. It is required in order to connect to the server | "" |
| minio.access-secret | The calue of the MinIO access secret. It is required in order to connect to the server | "" |
| minio.bucket-stats | Collect statistics about the buckets and files in buckets. It requires more computation, use it carefully in case of large buckets. | false |
./minio_exporter -minio.server minio-host.example:9000 -minio.access-key "login_name" -minio.access-secret "login_password"
Running the exporter using docker
docker pull joepll/minio-exporter
docker run -p 9290:9290 joepll/minio-exporter -minio.server "minio.host:9000" -minio.access-key "login_name" -minio.access-secret "login_secret"
The same result can be achieved with Environment variables. * LISTEN_ADDRESS: is the exporter address, as the option web.listen-address * METRIC_PATH: the telemetry path. It corresponds to web.telemetry-path * MINIO_URL: the URL of the MinIO server, as minio.server * MINIO_ACCESS_KEY: the MinIO access key (minio.access-key) * MINIO_ACCESS_SECRET: the MinIO access secret (minio.access-secret)
docker run \
-p 9290:9290 \
-e "MINIO_URL=http://host.local:9000" \
-e "MINIO_ACCESS_KEY=loginname" \
-e "MINIO_ACCESS_SECRET=password" \
joepll/minio-exporter
Prometheus resources
You can find more information about Prometheus on the official website and on github.
Here below some useful links.