mc admin prometheus metrics

Prints Prometheus metrics for a cluster.

The output includes additional information about each metric, such as if its value is a counter or gauge.

Syntax

Parameters

ALIAS

Required

The alias of a configured AIStor deployment for which the command prints metrics.

--api-version

Optional

To print v3 metrics, include an --api-version v3 parameter. v3 is the only accepted value.

Omit --api-version to print v2 metrics.

--bucket

Optional

Only valid for v3 metrics.

For v3 metric types that return bucket-level metrics, specify a bucket name. Requires --api-version.

--bucket works for the following v3 metric types:

  • api
  • batch
  • replication

The following example prints API metrics for the bucket mybucket:

mc admin prometheus metrics ALIAS api --bucket mybucket --api-version v3

TYPE

Optional

The type of metrics to print.

Valid values for metrics version 3 are:

  • api
  • audit
  • batch
  • cluster
  • debug
  • ilm
  • logger
  • notification
  • replication
  • scanner
  • system

If not specified, a v3 command returns all metrics except individual bucket metrics. For v3 bucket metrics, see --bucket.

Valid values for metrics version 2 are:

  • bucket
  • cluster
  • node
  • resource

If not specified, a v2 command returns cluster metrics.

Global Flags

This command supports any of the global flags.

Examples

Use mc admin prometheus metrics --api-version v3 to print all available v3 metrics and their current values for an AIStor deployment:

   mc admin prometheus metrics ALIAS --api-version v3
  • Replace ALIAS with the alias of the AIStor deployment.

To print a specific type of metric, include the TYPE. The following prints all v3 scanner metrics for a deployment:

   mc admin prometheus metrics ALIAS scanner --api-version v3

Certain v3 metric types accept a --bucket parameter to specify the bucket for which to print metrics. The following example prints v3 replication metrics for bucket mybucket:

   mc admin prometheus metrics ALIAS replication --bucket mybucket --api-version v3
  • Replace ALIAS with the alias of the AIStor deployment.

To print API or batch metrics for the bucket, replace replication with the desired type.

By default, mc admin prometheus metrics prints v2 cluster metrics:

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

To print another type of v2 metrics, specify the desired TYPE. The following example prints v2 bucket metrics:

   mc admin prometheus metrics ALIAS bucket

Accepted values are bucket, cluster, node, and resource.

All rights reserved 2024-Present, MinIO, Inc.