Skip to content

Instantly share code, notes, and snippets.

@stan1ey-shen
Last active February 19, 2025 09:01
Show Gist options
  • Save stan1ey-shen/106f47bab4e9886c2e284509d394adcb to your computer and use it in GitHub Desktop.
Save stan1ey-shen/106f47bab4e9886c2e284509d394adcb to your computer and use it in GitHub Desktop.

Grafana 監控 MinIO

MinIO 設定

透過 MinIO Client(mc) 取得 bearer_token

~$ mc alias set myminio http://sc-dss-storage:9000 USER_NAME PASSWORD && mc admin prometheus generate myminio
scrape_configs:
- job_name: minio-job
  bearer_token: ey......
  metrics_path: /minio/v2/metrics/cluster
  scheme: http
  static_configs:
  - targets: ['sc-dss-storage:9000']

或著有 docker 環境也可以直接使用:

~$ docker run --rm --add-host=sc-dss-storage:192.168.50.111 --entrypoint bash minio/mc:RELEASE.2024-10-02T08-27-28Z -c "mc alias set myminio http://sc-dss-storage:9000 USER_NAME PASSWORD && mc admin prometheus generate myminio"
scrape_configs:
- job_name: minio-job
  bearer_token: ey......
  metrics_path: /minio/v2/metrics/cluster
  scheme: http
  static_configs:
  - targets: ['sc-dss-storage:9000']

Prometheus 設定

依據上面的結果貼到 Prometheus config

Grafana 設定

匯入 dashboard - MinIO Dashboard ID: 13502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment