mc admin prometheus generate

Generates a metrics scraping configuration file for use with Prometheus.

Syntax

Parameters

ALIAS

Required

The alias of a configured AIStor deployment for which the command generates a Prometheus-compatible configuration file.

TYPE

Optional

The type of metrics to scrape.

Specify one of the following supported values:

  • bucket
  • cluster
  • node
  • resource

If not specified, the command returns cluster metrics. Cluster metrics also include node metrics.

Global Flags

This command supports any of the global flags.

Examples

Generate a scrape config for bucket metrics

Use mc admin prometheus generate to generate a scrape configuration that collects bucket metrics for a AIStor deployment:

   mc admin prometheus generate ALIAS bucket
  • Replace ALIAS with the alias of the AIStor deployment.

The output resembles the following:

scrape_configs:
- job_name: minio-job-bucket
  bearer_token: [auth token]
  metrics_path: /minio/v2/metrics/bucket
  scheme: http
  static_configs:
  - targets: ['localhost:9000']
All rights reserved 2024-Present, MinIO, Inc.