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:
apibatchreplication
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:
apiauditbatchclusterdebugilmloggernotificationreplicationscannersystem
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:
bucketclusternoderesource
If not specified, a v2 command returns cluster metrics.
Global flags
This command supports any of the global flags.
Examples
Print v3 metrics
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
ALIASwith thealiasof 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
Print v3 API, batch, or bucket replication metrics
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
ALIASwith thealiasof the AIStor deployment.
To print API or batch metrics for the bucket, replace replication with the desired type.
Print v2 cluster metrics
By default, mc admin prometheus metrics prints v2 cluster metrics:
mc admin prometheus metrics ALIAS
- Replace
ALIASwith thealiasof the AIStor deployment.
Print other types of v2 metrics
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.