minio / mc

Unix like utilities for object store
https://min.io/download
GNU Affero General Public License v3.0
2.86k stars 548 forks source link

Support metrics-v3 api in `admin prometheus generate` #4985

Closed anjalshireesh closed 3 months ago

anjalshireesh commented 3 months ago

Community Contribution License

All community contributions in this pull request are licensed to the project maintainers under the terms of the Apache 2 license. By creating this pull request I represent that I have the right to license the contributions to the project maintainers under the Apache 2 license.

Description

Add a flag --api-version with possible values of v2 and v3, with default being v2.

So when this flag is not passed, the command will work exactly as it did before.

When using v3, there is a different set of metric types supported. It also supports a new flag:

bucket: the bucket for which the metrics are to be fetched. it is applicable only for the metric types that are available at bucket level, which currently are 'api' and 'replication'

Motivation and Context

Support newly introduced metrics-v3 api

How to test this PR?

Types of changes

Checklist: