STEP 1:
Download MinIO Client cli
To download mc cli, execute the following commands:
wget https://dl.min.io/client/mc/release/linux-amd64/mc
chmod +x mc
STEP 2:
Add host to application
To add host to your application execute the following command:
mc config host add <ALIAS> <YOUR-MINIO-ENDPOINT> <YOUR-ACCESS-KEY> <YOUR-SECRET-KEY>
To know the steps to retrieve your ACCESS-KEY and SECRET-KEY click here.
Example Command:
./mc config host add test-minio http://35.222.65.164:32701 minio minio111
STEP 3:
Generate Prometheus config for the alias
mc admin prometheus generate <alias_provided_in_previous_steps>
Example Command:
./mc admin prometheus generate test-minio
The above command would display an output as shown below. This contains a bearer token that can be used to enable analytics.
Sample Output:
scrape_configs:
- job_name: minio-job
bearer_token: eyJhbGciOiJIjdcjhvjvjvvjCI6IkpXVCJ9.eyJleHAiOjQ3MzUxNzkyNDksImlzcyI6InByb21ldGhldXMiLCJzdWIiOiJtaW5pbyJ9._0_zWBaqi1nZemkg7G3JHjdo3ZwFNlHuNlGspj3MzsuzKAtKZ11Y4HSYhnzBMgLeR5GnqUmCwn7R0csYGXiwtQ
metrics_path: /minio/prometheus/metrics
scheme: http
static_configs:
- targets: ['35.222.65.164:32701']