From 37298d4a630eb13b159858323a695fd317ada186 Mon Sep 17 00:00:00 2001 From: Andrea Longo Date: Tue, 26 Nov 2024 16:44:15 -0700 Subject: [PATCH 1/4] draft: fixup v2/v3 metrics pages --- .../monitoring/metrics-and-alerts.rst | 23 +- ...trics-v2-deprecated.rst => metrics-v2.rst} | 40 +++- .../mc-admin-prometheus-generate.rst | 188 +++++++++++++-- .../mc-admin-prometheus-metrics.rst | 214 +++++++++--------- 4 files changed, 317 insertions(+), 148 deletions(-) rename source/operations/monitoring/{metrics-v2-deprecated.rst => metrics-v2.rst} (62%) diff --git a/source/operations/monitoring/metrics-and-alerts.rst b/source/operations/monitoring/metrics-and-alerts.rst index 118180d4a..c8af188c2 100644 --- a/source/operations/monitoring/metrics-and-alerts.rst +++ b/source/operations/monitoring/metrics-and-alerts.rst @@ -3,7 +3,7 @@ .. _minio-metrics-and-alerts: ================== -Metrics and Alerts +Metrics and alerts ================== .. default-domain:: minio @@ -12,15 +12,19 @@ Metrics and Alerts :local: :depth: 2 -.. admonition:: Metrics Version 2 Deprecated +.. admonition:: Metrics version 3 :class: note - Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, metrics version 3 replaces the deprecated :ref:`metrics version 2 `. + Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, metrics version 3 provides additional metrics scraping endpoints. + MinIO recommends version 3 for new deployments. + + Existing deployments can continue to use :ref:`metrics version 2 ` and :ref:`the v2 Grafana dashboards `. MinIO publishes cluster and node metrics using the :prometheus-docs:`Prometheus Data Model `. You can use any scraping tool to pull metrics data from MinIO for further analysis and alerting. -For metrics version 3, all metrics are available under the base ``/minio/metrics/v3`` endpoint by appending an additional path for each category. +For metrics version 3, all metrics are available under the base ``/minio/metrics/v3`` endpoint. +You can scrape the base endpoint to collect all metrics in a single scraping operation, or append an optional path to scrape a single category. For example, the following endpoint returns audit metrics: @@ -114,16 +118,10 @@ For a complete list of metrics for each endpoint, see :ref:`Available Metrics ` for visualizing collected metrics. -For more complete documentation on configuring a Prometheus-compatible data source for Grafana, see the :prometheus-docs:`Prometheus documentation on Grafana Support `. - .. _minio-metrics-and-alerts-available-metrics: -Available Metrics ------------------ +Available version 3 metrics +--------------------------- MinIO publishes a number of metrics at the cluster, node, or bucket levels. Each metric includes a label for the MinIO server which generated that metric. @@ -197,3 +195,4 @@ Each metric includes a label for the MinIO server which generated that metric. /operations/monitoring/collect-minio-metrics-using-prometheus /operations/monitoring/monitor-and-alert-using-influxdb + /operations/monitoring/metrics-v2 diff --git a/source/operations/monitoring/metrics-v2-deprecated.rst b/source/operations/monitoring/metrics-v2.rst similarity index 62% rename from source/operations/monitoring/metrics-v2-deprecated.rst rename to source/operations/monitoring/metrics-v2.rst index fb9075664..30115c0ba 100644 --- a/source/operations/monitoring/metrics-v2-deprecated.rst +++ b/source/operations/monitoring/metrics-v2.rst @@ -1,8 +1,7 @@ -:orphan: .. _minio-metrics-v2: ================= -Metrics Version 2 +Metrics version 2 ================= .. default-domain:: minio @@ -11,12 +10,41 @@ Metrics Version 2 :local: :depth: 3 -.. admonition:: Metrics Version 2 Deprecated - :class: note - Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, :ref:`metrics version 3 ` replaces the deprecated metrics version 2. +MinIO publishes cluster and node metrics using the :prometheus-docs:`Prometheus Data Model `. +You can use any scraping tool to pull metrics data from MinIO for further analysis and alerting. -The following sections describe the deprecated endpoints and metrics. +Metrics version 2 provides metrics organized into three categories: + +- :ref:`Cluster Metrics ` +- :ref:`Bucket Metrics ` +- :ref:`Resource Metrics ` + +Each v2 endpoint returns all metrics for its category. +For example, scraping the following endpoint returns all cluster metrics: + +.. code-block:: shell + :class: copyable + + http://HOSTNAME:PORT/minio/v2/metrics/cluster + +The base endpoint alone, ``/minio/v2/metrics/``, returns cluster metrics. + +For more flexible scraping and a wider range of metrics, use :ref:`metrics version 3. ` +Existing deployments can continue to use :ref:`metrics version 2 ` and :ref:`the v2 Grafana dashboards `. + + +MinIO Grafana dashboard +----------------------- + +MinIO publishes two :ref:`Grafana Dashboards ` for visualizing v2 metrics. +For more complete documentation on configuring a Prometheus-compatible data source for Grafana, see the :prometheus-docs:`Prometheus documentation on Grafana Support `. + + +Available version 2 metrics +--------------------------- + +The following sections describe the version 2 endpoints and metrics. .. tab-set:: diff --git a/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst b/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst index 5d8377135..89473e401 100644 --- a/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst +++ b/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst @@ -21,6 +21,12 @@ The :mc:`mc admin prometheus generate` command generates a metrics scraping conf For more complete documentation on using MinIO with Prometheus, see :ref:`How to monitor MinIO server with Prometheus ` +Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, :ref:`metrics version 3 (v3) ` provides additional metrics. +To generate a v3 scrape configuration use the ``--api_version v3`` option. + +MinIO recommends new deployments use :ref:`version 3 (v3) `. +Existing deployments can continue to use :ref:`metrics version 2 ` + .. admonition:: Use ``mc admin`` on MinIO Deployments Only :class: note @@ -32,7 +38,7 @@ For more complete documentation on using MinIO with Prometheus, see :ref:`How to .. tab-item:: EXAMPLE - The following command generates a Prometheus scrape configuration that collects bucket metrics from the deployment at :term:`alias` ``myminio``: + The following command generates a Prometheus scrape configuration that collects version 2 bucket metrics from the deployment at :term:`alias` ``myminio``: .. code-block:: shell :class: copyable @@ -46,9 +52,11 @@ For more complete documentation on using MinIO with Prometheus, see :ref:`How to .. code-block:: shell :class: copyable - mc [GLOBALFLAGS] admin prometheus generate \ - ALIAS \ - [TYPE] + mc [GLOBALFLAGS] admin prometheus generate \ + ALIAS \ + [TYPE] \ + [--api_version v3] \ + [TYPE --bucket --api_version v3] .. include:: /includes/common-minio-mc.rst :start-after: start-minio-syntax @@ -63,26 +71,64 @@ Parameters The :mc:`alias ` of a configured MinIO deployment for which the command generates a Prometheus-compatible configuration file. +.. mc-cmd:: --api-version + :optional: + + To generate a scrape configuration for :ref:`v3 metrics `, include an ``--api-version v3`` parameter. + ``v3`` is the only accepted value. + + Omit ``--api-version`` to generate a :ref:`v2 metrics ` configuration. + +.. mc-cmd:: --bucket + :optional: + + For v3 metric types that return bucket-level metrics, specify a bucket name. + Use with :mc-cmd:`~mc admin prometheus generate --api-version`. + + ``--bucket`` works for the following v3 metric types: + + - ``api`` + - ``replication`` + + The following example generates a configuration for API metrics from the bucket ``mybucket``: + + .. code-block:: shell + :class: copyable + + mc admin prometheus generate ALIAS api --bucket mybucket --api-version v3 + .. mc-cmd:: TYPE :optional: The type of metrics to scrape. - .. versionchanged:: RELEASE.2023-10-07T15-07-38Z + Valid values for metrics version 3 are: + + - ``api`` + - ``audit`` + - ``cluster`` + - ``debug`` + - ``ilm`` + - ``logger`` + - ``notification`` + - ``replication`` + - ``scanner`` + - ``system`` - ``resource`` metrics added + If not specified, a ``v3`` command returns all metrics. - Valid values are: + Valid values for metrics version 2 are: - ``bucket`` - ``cluster`` - ``node`` - ``resource`` - If not specified, the command returns cluster metrics. - Cluster metrics also include node metrics. + If not specified, a ``v2`` command returns cluster metrics. + Cluster metrics also include rollups of certain node metrics. -Global Flags + +Global flags ~~~~~~~~~~~~ .. include:: /includes/common-minio-mc.rst @@ -90,18 +136,68 @@ Global Flags :end-before: end-minio-mc-globals -Example -------- +Examples +-------- + +Generate a default metrics v3 config +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use :mc-cmd:`mc admin prometheus generate --api-version v3 ` to generate a scrape configuration that collects all v3 metrics for a MinIO deployment: + +.. code-block:: shell + :class: copyable + + mc admin prometheus generate ALIAS --api-version v3 + +- Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. + +The output resembles the following: + +.. code-block:: shell + + scrape_configs: + - job_name: minio-job + bearer_token: [auth token] + metrics_path: /minio/metrics/v3 + scheme: http + static_configs: + - targets: ['localhost:9000'] + +Generate a v3 cluster metrics config +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use :mc-cmd:`mc admin prometheus generate --api-version v3 ` to generate a scrape configuration that collects v3 cluster metrics for a MinIO deployment: + +.. code-block:: shell + :class: copyable + + mc admin prometheus generate ALIAS cluster --api-version v3 + +- Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. + +The output resembles the following: + +.. code-block:: shell + + scrape_configs: + - job_name: minio-job-cluster + bearer_token: [auth token] + metrics_path: /minio/metrics/v3/cluster + scheme: http + static_configs: + - targets: ['localhost:9000'] + +To generate a configuration for a :mc-cmd:`different metric type `, replace ``cluster`` with the desired type. -Generate a scrape config for bucket metrics -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Generate a v3 bucket replication metrics config +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use :mc-cmd:`mc admin prometheus generate` to generate a scrape configuration that collects bucket metrics for a MinIO deployment: +The following example generates a scrape configuration for v3 replication metrics of bucket ``mybucket``: .. code-block:: shell :class: copyable - mc admin prometheus generate ALIAS bucket + mc admin prometheus generate ALIAS replication --bucket mybucket --api-version v3 - Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. @@ -110,9 +206,65 @@ The output resembles the following: .. code-block:: shell scrape_configs: - - job_name: minio-job-bucket + - job_name: minio-job-replication bearer_token: [auth token] - metrics_path: /minio/v2/metrics/bucket + metrics_path: /minio/metrics/v3/bucket/replication/mybucket + scheme: https + static_configs: + - targets: [`localhost:9000`] + +Generate a v3 config for bucket API metrics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following example generates a scrape configuration for v3 API metrics for bucket ``mybucket``: + +.. code-block:: shell + :class: copyable + + mc admin prometheus generate ALIAS api --bucket mybucket --api-version v3 + +- Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. + +The output resembles the following: + +.. code-block:: shell + + scrape_configs: + - job_name: minio-job-api + bearer_token: [auth token] + metrics_path: /minio/metrics/v3/bucket/api/mybucket + scheme: https + static_configs: + - targets: [`localhost:9000`] + +Generate a default metrics v2 config +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +By default, :mc-cmd:`mc admin prometheus generate` generates a scrape configuration for v2 cluster metrics: + +.. code-block:: shell + :class: copyable + + mc admin prometheus generate ALIAS + +- Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. + +The output resembles the following: + +.. code-block:: shell + + scrape_configs: + - job_name: minio-job + bearer_token: [auth token] + metrics_path: /minio/v2/metrics scheme: http static_configs: - targets: ['localhost:9000'] + +To generate a configuration for another metric type, specify the type. +The following generates a scrape configuration for v2 bucket metrics: + +.. code-block:: shell + :class: copyable + + mc admin prometheus generate ALIAS bucket diff --git a/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst b/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst index eca5c2ee1..48e734c3c 100644 --- a/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst +++ b/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst @@ -19,8 +19,16 @@ The :mc:`mc admin prometheus metrics` command prints Prometheus metrics for a cl .. end-mc-admin-prometheus-metrics-desc +The output includes additional information about each metric, such as if its value is a ``counter`` or ``gauge``. + For more complete documentation on using MinIO with Prometheus, see :ref:`How to monitor MinIO server with Prometheus ` +Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, :ref:`metrics version 3 (v3) ` provides additional metrics. +To print v3 metrics use the ``--api_version v3`` option. + +MinIO recommends new deployments use :ref:`version 3 (v3) `. +Existing deployments can continue to use :ref:`metrics version 2 ` + .. admonition:: Use ``mc admin`` on MinIO Deployments Only :class: note @@ -47,8 +55,11 @@ For more complete documentation on using MinIO with Prometheus, see :ref:`How to :class: copyable mc [GLOBALFLAGS] admin prometheus metrics \ - ALIAS \ - [TYPE] + ALIAS \ + [TYPE] \ + [--api_version v3] \ + [TYPE --bucket --api_version v3] + .. include:: /includes/common-minio-mc.rst :start-after: start-minio-syntax @@ -63,27 +74,64 @@ Parameters The :mc:`alias ` of a configured MinIO deployment for which the command prints metrics. +.. mc-cmd:: --api-version + :optional: + + To print :ref:`version 3 (v3) ` metrics, include an ``--api-version v3`` parameter. + ``v3`` is the only accepted value. + + Omit ``--api-version`` to print :ref:`version 2 (v2) ` metrics. + +.. mc-cmd:: --bucket + :optional: + + For v3 metric types that return bucket-level metrics, specify a bucket name. + Use with :mc-cmd:`~mc admin prometheus metrics --api-version`. + + ``--bucket`` works for the following v3 metric types: + + - ``api`` + - ``replication`` + + The following example prints API metrics for the bucket ``mybucket``: + + .. code-block:: shell + :class: copyable + + mc admin prometheus metrics ALIAS api --bucket mybucket --api-version v3 + .. mc-cmd:: TYPE :optional: The type of metrics to print. - .. versionchanged:: RELEASE.2023-10-07T15-07-38Z + Valid values for metrics version 3 are: - ``resource`` metrics added + - ``api`` + - ``audit`` + - ``cluster`` + - ``debug`` + - ``ilm`` + - ``logger`` + - ``notification`` + - ``replication`` + - ``scanner`` + - ``system`` + + If not specified, a ``v3`` command returns all metrics. - Valid values are: + Valid values for metrics version 2 are: - ``bucket`` - ``cluster`` - ``node`` - ``resource`` - If not specified, the command returns cluster metrics. - Cluster metrics include rollups of certain node metrics. - The output includes additional information about each metric, such as if its value is a ``counter`` or ``gauge``. + If not specified, a ``v2`` command returns cluster metrics. + Cluster metrics also include rollups of certain node metrics. + -Global Flags +Global flags ~~~~~~~~~~~~ .. include:: /includes/common-minio-mc.rst @@ -91,118 +139,60 @@ Global Flags :end-before: end-minio-mc-globals -Example -------- +Examples +-------- + +Print v3 metrics +~~~~~~~~~~~~~~~~ + +Use :mc-cmd:`mc admin prometheus metrics --api-version v3 ` to print all available v3 metrics and their current values for a MinIO deployment: -Print bucket metrics -~~~~~~~~~~~~~~~~~~~~ +.. code-block:: shell + :class: copyable + + mc admin prometheus metrics ALIAS --api-version v3 + +- Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. + +To print a specific type of metrics, include the :mc-cmd:`~mc admin prometheus metrics TYPE`. +The following prints all scanner metrics for a deployment: + +.. code-block:: shell + :class: copyable + + mc admin prometheus metrics ALIAS scanner --api-version v3 + +Print v3 bucket replication metrics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use :mc-cmd:`mc admin prometheus metrics` to print bucket metrics for a MinIO deployment: +Certain metric types accept a :mc-cmd:`~mc admin prometheus metrics --bucket` parameter to specify the bucket for which to print metrics. +The following example prints v3 replication metrics for bucket ``mybucket``: .. code-block:: shell :class: copyable - mc admin prometheus metrics ALIAS bucket + mc admin prometheus metrics ALIAS replication --bucket mybucket --api-version v3 - Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. -The output resembles the following: +To print API metrics for a bucket, replace ``replication`` with ``api``. + +Print v2 metrics +~~~~~~~~~~~~~~~~ + +By default, :mc-cmd:`mc admin prometheus metrics` prints v2 cluster metrics: + +.. code-block:: shell + :class: copyable + + mc admin prometheus metrics ALIAS + +- Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. + +To print another type of metrics, specify the desired :mc-cmd:`~mc admin prometheus metrics TYPE`. +The following example prints v2 bucket metrics: .. code-block:: shell + :class: copyable - # HELP minio_bucket_objects_size_distribution Distribution of object sizes in the bucket, includes label for the bucket name - # TYPE minio_bucket_objects_size_distribution gauge - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_1024B_AND_1_MB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_1024_B_AND_64_KB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_10_MB_AND_64_MB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_128_MB_AND_512_MB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_1_MB_AND_10_MB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_256_KB_AND_512_KB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_512_KB_AND_1_MB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_64_KB_AND_256_KB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="BETWEEN_64_MB_AND_128_MB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="GREATER_THAN_512_MB",server="127.0.0.1:9000"} 0 - minio_bucket_objects_size_distribution{bucket="mybucket",range="LESS_THAN_1024_B",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_objects_version_distribution Distribution of object sizes in the bucket, includes label for the bucket name - # TYPE minio_bucket_objects_version_distribution gauge - minio_bucket_objects_version_distribution{bucket="mybucket",range="BETWEEN_1000_AND_10000",server="127.0.0.1:9000"} 0 - minio_bucket_objects_version_distribution{bucket="mybucket",range="BETWEEN_100_AND_1000",server="127.0.0.1:9000"} 0 - minio_bucket_objects_version_distribution{bucket="mybucket",range="BETWEEN_10_AND_100",server="127.0.0.1:9000"} 0 - minio_bucket_objects_version_distribution{bucket="mybucket",range="BETWEEN_2_AND_10",server="127.0.0.1:9000"} 0 - minio_bucket_objects_version_distribution{bucket="mybucket",range="GREATER_THAN_10000",server="127.0.0.1:9000"} 0 - minio_bucket_objects_version_distribution{bucket="mybucket",range="SINGLE_VERSION",server="127.0.0.1:9000"} 0 - minio_bucket_objects_version_distribution{bucket="mybucket",range="UNVERSIONED",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_delete_tagging_requests_failures Number of failures in DELETE tagging proxy requests to replication target - # TYPE minio_bucket_replication_proxied_delete_tagging_requests_failures counter - minio_bucket_replication_proxied_delete_tagging_requests_failures{server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_delete_tagging_requests_total Number of DELETE tagging requests proxied to replication target - # TYPE minio_bucket_replication_proxied_delete_tagging_requests_total counter - minio_bucket_replication_proxied_delete_tagging_requests_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_get_requests_failures Number of failures in GET requests proxied to replication target - # TYPE minio_bucket_replication_proxied_get_requests_failures counter - minio_bucket_replication_proxied_get_requests_failures{server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_get_requests_total Number of GET requests proxied to replication target - # TYPE minio_bucket_replication_proxied_get_requests_total counter - minio_bucket_replication_proxied_get_requests_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_get_tagging_requests_failures Number of failures in GET tagging proxy requests to replication target - # TYPE minio_bucket_replication_proxied_get_tagging_requests_failures counter - minio_bucket_replication_proxied_get_tagging_requests_failures{server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_get_tagging_requests_total Number of GET tagging requests proxied to replication target - # TYPE minio_bucket_replication_proxied_get_tagging_requests_total counter - minio_bucket_replication_proxied_get_tagging_requests_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_head_requests_failures Number of failures in HEAD requests proxied to replication target - # TYPE minio_bucket_replication_proxied_head_requests_failures counter - minio_bucket_replication_proxied_head_requests_failures{server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_head_requests_total Number of HEAD requests proxied to replication target - # TYPE minio_bucket_replication_proxied_head_requests_total counter - minio_bucket_replication_proxied_head_requests_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_put_tagging_requests_failures Number of failures in PUT tagging proxy requests to replication target - # TYPE minio_bucket_replication_proxied_put_tagging_requests_failures counter - minio_bucket_replication_proxied_put_tagging_requests_failures{server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_proxied_put_tagging_requests_total Number of PUT tagging requests proxied to replication target - # TYPE minio_bucket_replication_proxied_put_tagging_requests_total counter - minio_bucket_replication_proxied_put_tagging_requests_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_received_bytes Total number of bytes replicated to this bucket from another source bucket - # TYPE minio_bucket_replication_received_bytes counter - minio_bucket_replication_received_bytes{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_replication_received_count Total number of objects received by this bucket from another source bucket - # TYPE minio_bucket_replication_received_count gauge - minio_bucket_replication_received_count{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_requests_4xx_errors_total Total number of S3 requests with (4xx) errors on a bucket - # TYPE minio_bucket_requests_4xx_errors_total counter - minio_bucket_requests_4xx_errors_total{api="getbucketobjectlockconfig",bucket="mybucket",server="127.0.0.1:9000"} 1 - # HELP minio_bucket_requests_inflight_total Total number of S3 requests currently in flight on a bucket - # TYPE minio_bucket_requests_inflight_total gauge - minio_bucket_requests_inflight_total{api="getbucketlocation",bucket="mybucket",server="127.0.0.1:9000"} 0 - minio_bucket_requests_inflight_total{api="getbucketobjectlockconfig",bucket="mybucket",server="127.0.0.1:9000"} 0 - minio_bucket_requests_inflight_total{api="headbucket",bucket="mybucket",server="127.0.0.1:9000"} 0 - minio_bucket_requests_inflight_total{api="listobjectsv2",bucket="mybucket",server="127.0.0.1:9000"} 0 - minio_bucket_requests_inflight_total{api="putobject",bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_requests_total Total number of S3 requests on a bucket - # TYPE minio_bucket_requests_total counter - minio_bucket_requests_total{api="getbucketlocation",bucket="mybucket",server="127.0.0.1:9000"} 2 - minio_bucket_requests_total{api="getbucketobjectlockconfig",bucket="mybucket",server="127.0.0.1:9000"} 1 - minio_bucket_requests_total{api="headbucket",bucket="mybucket",server="127.0.0.1:9000"} 2 - minio_bucket_requests_total{api="listobjectsv2",bucket="mybucket",server="127.0.0.1:9000"} 1 - minio_bucket_requests_total{api="putobject",bucket="mybucket",server="127.0.0.1:9000"} 1 - # HELP minio_bucket_traffic_received_bytes Total number of S3 bytes received for this bucket - # TYPE minio_bucket_traffic_received_bytes gauge - minio_bucket_traffic_received_bytes{bucket="mybucket",server="127.0.0.1:9000"} 178 - # HELP minio_bucket_traffic_sent_bytes Total number of S3 bytes sent for this bucket - # TYPE minio_bucket_traffic_sent_bytes gauge - minio_bucket_traffic_sent_bytes{bucket="mybucket",server="127.0.0.1:9000"} 1232 - # HELP minio_bucket_usage_deletemarker_total Total number of delete markers - # TYPE minio_bucket_usage_deletemarker_total gauge - minio_bucket_usage_deletemarker_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_usage_object_total Total number of objects - # TYPE minio_bucket_usage_object_total gauge - minio_bucket_usage_object_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_usage_total_bytes Total bucket size in bytes - # TYPE minio_bucket_usage_total_bytes gauge - minio_bucket_usage_total_bytes{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_bucket_usage_version_total Total number of versions (includes delete marker) - # TYPE minio_bucket_usage_version_total gauge - minio_bucket_usage_version_total{bucket="mybucket",server="127.0.0.1:9000"} 0 - # HELP minio_usage_last_activity_nano_seconds Time elapsed (in nano seconds) since last scan activity - # TYPE minio_usage_last_activity_nano_seconds gauge - minio_usage_last_activity_nano_seconds{server="127.0.0.1:9000"} 5.6046668864e+10 + mc admin prometheus metrics ALIAS bucket From 9e85c4ce75b6c7dab4114dc8db1c290bb8845a89 Mon Sep 17 00:00:00 2001 From: Andrea Longo Date: Wed, 27 Nov 2024 10:50:44 -0700 Subject: [PATCH 2/4] more v2/v3 rearranging --- .../monitoring/collect-minio-metrics-using-prometheus.rst | 3 +++ source/operations/monitoring/grafana.rst | 8 +++++++- source/operations/monitoring/healthcheck-probe.rst | 5 +++-- .../monitoring/monitor-and-alert-using-influxdb.rst | 3 +++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst b/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst index 12259f651..9b3c7c5be 100644 --- a/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst +++ b/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst @@ -32,6 +32,9 @@ The procedure on this page documents the following: - An :mc:`mc` installation on your local host configured to :ref:`access ` the MinIO deployment + These instructions use :ref:`version 2 metrics. ` + For more about metrics API versions, see :ref:`Metrics and alerts. ` + Configure Prometheus to Collect and Alert using MinIO Metrics ------------------------------------------------------------- diff --git a/source/operations/monitoring/grafana.rst b/source/operations/monitoring/grafana.rst index 6e1821b31..82f81ea59 100644 --- a/source/operations/monitoring/grafana.rst +++ b/source/operations/monitoring/grafana.rst @@ -11,7 +11,6 @@ Monitor a MinIO Server with Grafana :depth: 2 `Grafana `__ allows you to query, visualize, alert on and understand your metrics no matter where they are stored. -Create, explore, and share dashboards with your team and foster a data driven culture. Prerequisites ------------- @@ -20,6 +19,13 @@ Prerequisites - An existing MinIO deployment with network access to the Prometheus deployment - `Grafana installed `__ +.. admonition:: Grafana dashboards use metrics version 2 + :class: note + + The MinIO Grafana dashboards are designed for use with :ref:`metrics version 2 `. + For more about metrics API versions, see :ref:`Metrics and alerts. ` + + MinIO Grafana Dashboard ----------------------- diff --git a/source/operations/monitoring/healthcheck-probe.rst b/source/operations/monitoring/healthcheck-probe.rst index db59d8ba0..a36f2113e 100644 --- a/source/operations/monitoring/healthcheck-probe.rst +++ b/source/operations/monitoring/healthcheck-probe.rst @@ -35,8 +35,9 @@ the server, such as a transient network issue or potential downtime. The healthcheck probe alone cannot determine if a MinIO server is offline - only that the current host machine cannot reach the server. Consider configuring -a Prometheus :ref:`alert ` using the -``minio_cluster_nodes_offline_total`` metric to detect whether one or +a Prometheus :ref:`alert ` using the +metrics v3 ``minio_cluster_health_nodes_offline_count`` or v2 +``minio_cluster_nodes_offline_total`` metrics to detect whether one or more MinIO nodes are offline. .. _minio-cluster-write-quorum: diff --git a/source/operations/monitoring/monitor-and-alert-using-influxdb.rst b/source/operations/monitoring/monitor-and-alert-using-influxdb.rst index ae0c2262d..a5c2abd25 100644 --- a/source/operations/monitoring/monitor-and-alert-using-influxdb.rst +++ b/source/operations/monitoring/monitor-and-alert-using-influxdb.rst @@ -27,6 +27,9 @@ The procedure on this page documents the following: - An existing MinIO deployment with network access to the InfluxDB deployment - An :mc:`mc` installation on your local host configured to :ref:`access ` the MinIO deployment + These instructions use :ref:`version 2 metrics. ` + For more about metrics API versions, see :ref:`Metrics and alerts. ` + .. cond:: k8s This procedure assumes all necessary network control components, such as Ingress or Load Balancers, to facilitate access between the MinIO Tenant and the InfluxDB service. From 164e8fd81cd35b020ea08656e269a71e24c763a4 Mon Sep 17 00:00:00 2001 From: Andrea Longo Date: Wed, 27 Nov 2024 11:10:24 -0700 Subject: [PATCH 3/4] more edits --- source/operations/monitoring/healthcheck-probe.rst | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/operations/monitoring/healthcheck-probe.rst b/source/operations/monitoring/healthcheck-probe.rst index a36f2113e..5e2c205e6 100644 --- a/source/operations/monitoring/healthcheck-probe.rst +++ b/source/operations/monitoring/healthcheck-probe.rst @@ -33,12 +33,8 @@ A response code of ``200 OK`` indicates the MinIO server is online and functional. Any other HTTP codes indicate an issue with reaching the server, such as a transient network issue or potential downtime. -The healthcheck probe alone cannot determine if a MinIO server is offline - only -that the current host machine cannot reach the server. Consider configuring -a Prometheus :ref:`alert ` using the -metrics v3 ``minio_cluster_health_nodes_offline_count`` or v2 -``minio_cluster_nodes_offline_total`` metrics to detect whether one or -more MinIO nodes are offline. +The healthcheck probe alone cannot determine if a MinIO server is offline - only that the current host machine cannot reach the server. +Consider configuring a Prometheus :ref:`alert ` using the :ref:`metrics v3 ` ``minio_cluster_health_nodes_offline_count`` or :ref:`v2 ` ``minio_cluster_nodes_offline_total`` metrics to detect whether one or more MinIO nodes are offline. .. _minio-cluster-write-quorum: From 35b674eb920c91ba785cde80bf315af2bf8a5665 Mon Sep 17 00:00:00 2001 From: Andrea Longo Date: Wed, 4 Dec 2024 15:37:02 -0700 Subject: [PATCH 4/4] edits from feedback and more --- ...collect-minio-metrics-using-prometheus.rst | 5 ++-- source/operations/monitoring/grafana.rst | 6 ++-- .../monitoring/healthcheck-probe.rst | 5 ++-- .../monitoring/metrics-and-alerts.rst | 25 +++++++++------- source/operations/monitoring/metrics-v2.rst | 5 +++- .../mc-admin-prometheus-generate.rst | 27 ++++++++++++----- .../mc-admin-prometheus-metrics.rst | 29 ++++++++++++------- 7 files changed, 66 insertions(+), 36 deletions(-) diff --git a/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst b/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst index 9b3c7c5be..cba9ca95a 100644 --- a/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst +++ b/source/operations/monitoring/collect-minio-metrics-using-prometheus.rst @@ -21,6 +21,9 @@ The procedure on this page documents the following: - Configuring a Prometheus service to scrape and display metrics from a MinIO deployment - Configuring an Alert Rule on a MinIO Metric to trigger an AlertManager action +These instructions use :ref:`version 2 metrics. ` +For more about metrics API versions, see :ref:`Metrics and alerts. ` + .. admonition:: Prerequisites :class: note @@ -32,8 +35,6 @@ The procedure on this page documents the following: - An :mc:`mc` installation on your local host configured to :ref:`access ` the MinIO deployment - These instructions use :ref:`version 2 metrics. ` - For more about metrics API versions, see :ref:`Metrics and alerts. ` Configure Prometheus to Collect and Alert using MinIO Metrics ------------------------------------------------------------- diff --git a/source/operations/monitoring/grafana.rst b/source/operations/monitoring/grafana.rst index 82f81ea59..88d0c92e3 100644 --- a/source/operations/monitoring/grafana.rst +++ b/source/operations/monitoring/grafana.rst @@ -22,10 +22,12 @@ Prerequisites .. admonition:: Grafana dashboards use metrics version 2 :class: note - The MinIO Grafana dashboards are designed for use with :ref:`metrics version 2 `. + The MinIO Grafana dashboards use :ref:`metrics version 2 `. For more about metrics API versions, see :ref:`Metrics and alerts. ` - + Version 3 metrics require creating your own dashboard. + For more information about dashboards, see `the Grafana documentation. `__ + MinIO Grafana Dashboard ----------------------- diff --git a/source/operations/monitoring/healthcheck-probe.rst b/source/operations/monitoring/healthcheck-probe.rst index 5e2c205e6..01fd60a91 100644 --- a/source/operations/monitoring/healthcheck-probe.rst +++ b/source/operations/monitoring/healthcheck-probe.rst @@ -33,8 +33,9 @@ A response code of ``200 OK`` indicates the MinIO server is online and functional. Any other HTTP codes indicate an issue with reaching the server, such as a transient network issue or potential downtime. -The healthcheck probe alone cannot determine if a MinIO server is offline - only that the current host machine cannot reach the server. -Consider configuring a Prometheus :ref:`alert ` using the :ref:`metrics v3 ` ``minio_cluster_health_nodes_offline_count`` or :ref:`v2 ` ``minio_cluster_nodes_offline_total`` metrics to detect whether one or more MinIO nodes are offline. +The healthcheck probe alone cannot determine if a MinIO server is offline. +Instead, the probe determines whether the current host machine can reach the server. +Consider configuring a Prometheus :ref:`alert ` using ``minio_cluster_health_nodes_offline_count`` for :ref:`metrics v3 ` or ``minio_cluster_nodes_offline_total`` for :ref:`metrics v2 ` to detect whether one or more MinIO nodes are offline. .. _minio-cluster-write-quorum: diff --git a/source/operations/monitoring/metrics-and-alerts.rst b/source/operations/monitoring/metrics-and-alerts.rst index c8af188c2..79174a01f 100644 --- a/source/operations/monitoring/metrics-and-alerts.rst +++ b/source/operations/monitoring/metrics-and-alerts.rst @@ -12,19 +12,24 @@ Metrics and alerts :local: :depth: 2 -.. admonition:: Metrics version 3 + +MinIO publishes metrics using the :prometheus-docs:`Prometheus Data Model `. +You can use any scraping tool to pull metrics data from MinIO for further analysis and alerting. + +Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, metrics version 3 provides additional endpoints. +MinIO recommends version 3 for new deployments. + +.. admonition:: Metrics version 2 :class: note - Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, metrics version 3 provides additional metrics scraping endpoints. - MinIO recommends version 3 for new deployments. + Existing deployments can continue to use version 2 :ref:`metrics ` and :ref:`Grafana dashboards `. - Existing deployments can continue to use :ref:`metrics version 2 ` and :ref:`the v2 Grafana dashboards `. -MinIO publishes cluster and node metrics using the :prometheus-docs:`Prometheus Data Model `. -You can use any scraping tool to pull metrics data from MinIO for further analysis and alerting. +Version 3 Endpoints +------------------- For metrics version 3, all metrics are available under the base ``/minio/metrics/v3`` endpoint. -You can scrape the base endpoint to collect all metrics in a single scraping operation, or append an optional path to scrape a single category. +You can scrape the base endpoint to collect all metrics in a single operation, or append an optional path to return a specific category. For example, the following endpoint returns audit metrics: @@ -102,7 +107,7 @@ MinIO provides the following scraping endpoints, relative to the base URL: ``/system/process`` -For a complete list of metrics for each endpoint, see :ref:`Available Metrics `. +For a complete list of metrics for each endpoint, see :ref:`Available version 3 etrics `. .. cond:: k8s @@ -123,8 +128,7 @@ For a complete list of metrics for each endpoint, see :ref:`Available Metrics ` - :ref:`Audit Metrics ` @@ -137,6 +141,7 @@ Each metric includes a label for the MinIO server which generated that metric. - :ref:`Scanner Metrics ` - :ref:`System Metrics ` +Many metrics include labels identifying the resource which generated that metric and other relevant details. .. _minio-available-v3-api-metrics: diff --git a/source/operations/monitoring/metrics-v2.rst b/source/operations/monitoring/metrics-v2.rst index 30115c0ba..a6946bfd6 100644 --- a/source/operations/monitoring/metrics-v2.rst +++ b/source/operations/monitoring/metrics-v2.rst @@ -14,6 +14,9 @@ Metrics version 2 MinIO publishes cluster and node metrics using the :prometheus-docs:`Prometheus Data Model `. You can use any scraping tool to pull metrics data from MinIO for further analysis and alerting. +Version 3 Endpoints +------------------- + Metrics version 2 provides metrics organized into three categories: - :ref:`Cluster Metrics ` @@ -31,7 +34,7 @@ For example, scraping the following endpoint returns all cluster metrics: The base endpoint alone, ``/minio/v2/metrics/``, returns cluster metrics. For more flexible scraping and a wider range of metrics, use :ref:`metrics version 3. ` -Existing deployments can continue to use :ref:`metrics version 2 ` and :ref:`the v2 Grafana dashboards `. + Existing deployments can continue to use version 2 :ref:`metrics ` and :ref:`Grafana dashboards `. MinIO Grafana dashboard diff --git a/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst b/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst index 89473e401..5da567c19 100644 --- a/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst +++ b/source/reference/minio-mc-admin/mc-admin-prometheus-generate.rst @@ -21,7 +21,7 @@ The :mc:`mc admin prometheus generate` command generates a metrics scraping conf For more complete documentation on using MinIO with Prometheus, see :ref:`How to monitor MinIO server with Prometheus ` -Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, :ref:`metrics version 3 (v3) ` provides additional metrics. +Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, :ref:`metrics version 3 (v3) ` provides additional endpoints and metrics. To generate a v3 scrape configuration use the ``--api_version v3`` option. MinIO recommends new deployments use :ref:`version 3 (v3) `. @@ -56,7 +56,7 @@ Existing deployments can continue to use :ref:`metrics version 2 --api_version v3] + [--bucket ] .. include:: /includes/common-minio-mc.rst :start-after: start-minio-syntax @@ -76,14 +76,16 @@ Parameters To generate a scrape configuration for :ref:`v3 metrics `, include an ``--api-version v3`` parameter. ``v3`` is the only accepted value. - + Omit ``--api-version`` to generate a :ref:`v2 metrics ` configuration. .. mc-cmd:: --bucket :optional: + Only valid for v3 metrics. + For v3 metric types that return bucket-level metrics, specify a bucket name. - Use with :mc-cmd:`~mc admin prometheus generate --api-version`. + Requires :mc-cmd:`~mc admin prometheus generate --api-version`. ``--bucket`` works for the following v3 metric types: @@ -125,7 +127,7 @@ Parameters - ``resource`` If not specified, a ``v2`` command returns cluster metrics. - Cluster metrics also include rollups of certain node metrics. + Cluster metrics include rollups of certain node metrics. Global flags @@ -163,10 +165,12 @@ The output resembles the following: static_configs: - targets: ['localhost:9000'] -Generate a v3 cluster metrics config -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Use :mc-cmd:`mc admin prometheus generate --api-version v3 ` to generate a scrape configuration that collects v3 cluster metrics for a MinIO deployment: +Generate a v3 metrics config for another type +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To generate a configuration for another metric type, specify the type. +The following generates a scrape configuration for v3 cluster metrics: .. code-block:: shell :class: copyable @@ -189,6 +193,7 @@ The output resembles the following: To generate a configuration for a :mc-cmd:`different metric type `, replace ``cluster`` with the desired type. + Generate a v3 bucket replication metrics config ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -237,6 +242,7 @@ The output resembles the following: static_configs: - targets: [`localhost:9000`] + Generate a default metrics v2 config ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -261,6 +267,10 @@ The output resembles the following: static_configs: - targets: ['localhost:9000'] + +Generate a v2 config for other metric types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + To generate a configuration for another metric type, specify the type. The following generates a scrape configuration for v2 bucket metrics: @@ -268,3 +278,4 @@ The following generates a scrape configuration for v2 bucket metrics: :class: copyable mc admin prometheus generate ALIAS bucket + diff --git a/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst b/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst index 48e734c3c..df344ae39 100644 --- a/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst +++ b/source/reference/minio-mc-admin/mc-admin-prometheus-metrics.rst @@ -23,7 +23,7 @@ The output includes additional information about each metric, such as if its val For more complete documentation on using MinIO with Prometheus, see :ref:`How to monitor MinIO server with Prometheus ` -Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, :ref:`metrics version 3 (v3) ` provides additional metrics. +Starting with MinIO Server :minio-release:`RELEASE.2024-07-15T19-02-30Z` and MinIO Client :mc-release:`RELEASE.2024-07-11T18-01-28Z`, :ref:`metrics version 3 (v3) ` provides additional endpoints and metrics. To print v3 metrics use the ``--api_version v3`` option. MinIO recommends new deployments use :ref:`version 3 (v3) `. @@ -58,7 +58,7 @@ Existing deployments can continue to use :ref:`metrics version 2 --api_version v3] + [--bucket ] .. include:: /includes/common-minio-mc.rst @@ -85,8 +85,8 @@ Parameters .. mc-cmd:: --bucket :optional: + Requires :mc-cmd:`~mc admin prometheus metrics --api-version`. For v3 metric types that return bucket-level metrics, specify a bucket name. - Use with :mc-cmd:`~mc admin prometheus metrics --api-version`. ``--bucket`` works for the following v3 metric types: @@ -128,7 +128,7 @@ Parameters - ``resource`` If not specified, a ``v2`` command returns cluster metrics. - Cluster metrics also include rollups of certain node metrics. + Cluster metrics include rollups of certain node metrics. Global flags @@ -162,10 +162,10 @@ The following prints all scanner metrics for a deployment: mc admin prometheus metrics ALIAS scanner --api-version v3 -Print v3 bucket replication metrics -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Print v3 API or bucket replication metrics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Certain metric types accept a :mc-cmd:`~mc admin prometheus metrics --bucket` parameter to specify the bucket for which to print metrics. +Certain v3 metric types accept a :mc-cmd:`~mc admin prometheus metrics --bucket` parameter to specify the bucket for which to print metrics. The following example prints v3 replication metrics for bucket ``mybucket``: .. code-block:: shell @@ -175,10 +175,11 @@ The following example prints v3 replication metrics for bucket ``mybucket``: - Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. -To print API metrics for a bucket, replace ``replication`` with ``api``. +To print API metrics for the bucket, replace ``replication`` with ``api``. -Print v2 metrics -~~~~~~~~~~~~~~~~ + +Print v2 cluster metrics +~~~~~~~~~~~~~~~~~~~~~~~~ By default, :mc-cmd:`mc admin prometheus metrics` prints v2 cluster metrics: @@ -189,10 +190,16 @@ By default, :mc-cmd:`mc admin prometheus metrics` prints v2 cluster metrics: - Replace ``ALIAS`` with the :mc-cmd:`alias ` of the MinIO deployment. -To print another type of metrics, specify the desired :mc-cmd:`~mc admin prometheus metrics TYPE`. + +Print other types of v2 metrics +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To print another type of v2 metrics, specify the desired :mc-cmd:`~mc admin prometheus metrics TYPE`. The following example prints v2 bucket metrics: .. code-block:: shell :class: copyable mc admin prometheus metrics ALIAS bucket + +Accepted values are ``bucket``, ``cluster``, ``node``, and ``resource``.