Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undeprecate v2 metrics #1375

Merged
merged 5 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ The procedure on this page documents the following:

- An :mc:`mc` installation on your local host configured to :ref:`access <alias>` the MinIO deployment

These instructions use :ref:`version 2 metrics. <minio-metrics-v2>`
feorlen marked this conversation as resolved.
Show resolved Hide resolved
For more about metrics API versions, see :ref:`Metrics and alerts. <minio-metrics-and-alerts>`

Configure Prometheus to Collect and Alert using MinIO Metrics
-------------------------------------------------------------

Expand Down
8 changes: 7 additions & 1 deletion source/operations/monitoring/grafana.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Monitor a MinIO Server with Grafana
:depth: 2

`Grafana <https://grafana.com/>`__ 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
-------------
Expand All @@ -20,6 +19,13 @@ Prerequisites
- An existing MinIO deployment with network access to the Prometheus deployment
- `Grafana installed <https://grafana.com/grafana/download>`__

.. admonition:: Grafana dashboards use metrics version 2
:class: note

The MinIO Grafana dashboards are designed for use with :ref:`metrics version 2 <minio-metrics-v2>`.
feorlen marked this conversation as resolved.
Show resolved Hide resolved
For more about metrics API versions, see :ref:`Metrics and alerts. <minio-metrics-and-alerts>`
feorlen marked this conversation as resolved.
Show resolved Hide resolved


MinIO Grafana Dashboard
-----------------------

Expand Down
5 changes: 3 additions & 2 deletions source/operations/monitoring/healthcheck-probe.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <minio-metrics-and-alerts>` using the
``minio_cluster_nodes_offline_total`` metric to detect whether one or
a Prometheus :ref:`alert <minio-metrics-and-alerts>` 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:
Expand Down
23 changes: 11 additions & 12 deletions source/operations/monitoring/metrics-and-alerts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.. _minio-metrics-and-alerts:

==================
Metrics and Alerts
Metrics and alerts
==================

.. default-domain:: minio
Expand All @@ -12,15 +12,19 @@ Metrics and Alerts
:local:
:depth: 2

.. admonition:: Metrics Version 2 Deprecated
.. admonition:: Metrics version 3
:class: note

feorlen marked this conversation as resolved.
Show resolved Hide resolved
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 <minio-metrics-v2>`.
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.
feorlen marked this conversation as resolved.
Show resolved Hide resolved
MinIO recommends version 3 for new deployments.

Existing deployments can continue to use :ref:`metrics version 2 <minio-metrics-v2>` and :ref:`the v2 Grafana dashboards <minio-grafana>`.
feorlen marked this conversation as resolved.
Show resolved Hide resolved

MinIO publishes cluster and node metrics using the :prometheus-docs:`Prometheus Data Model <concepts/data_model/>`.
You can use any scraping tool to pull metrics data from MinIO for further analysis and alerting.

feorlen marked this conversation as resolved.
Show resolved Hide resolved
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.
feorlen marked this conversation as resolved.
Show resolved Hide resolved

For example, the following endpoint returns audit metrics:

Expand Down Expand Up @@ -114,16 +118,10 @@ For a complete list of metrics for each endpoint, see :ref:`Available Metrics <m
- Set :envvar:`MINIO_PROMETHEUS_URL` to the URL of the Prometheus service
- Set :envvar:`MINIO_PROMETHEUS_JOB_ID` to the unique job ID assigned to the collected metrics

MinIO Grafana Dashboard
-----------------------

MinIO also publishes two :ref:`Grafana Dashboards <minio-grafana>` 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 <visualization/grafana/>`.

.. _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.
Expand Down Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
:orphan:
.. _minio-metrics-v2:

=================
Metrics Version 2
Metrics version 2
=================

.. default-domain:: minio
Expand All @@ -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 <minio-metrics-and-alerts>` replaces the deprecated metrics version 2.
MinIO publishes cluster and node metrics using the :prometheus-docs:`Prometheus Data Model <concepts/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 <minio-available-cluster-metrics>`
- :ref:`Bucket Metrics <minio-available-bucket-metrics>`
- :ref:`Resource Metrics <minio-available-resource-metrics>`

feorlen marked this conversation as resolved.
Show resolved Hide resolved
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. <minio-metrics-and-alerts>`
Existing deployments can continue to use :ref:`metrics version 2 <minio-metrics-v2>` and :ref:`the v2 Grafana dashboards <minio-grafana>`.
feorlen marked this conversation as resolved.
Show resolved Hide resolved


MinIO Grafana dashboard
-----------------------

MinIO publishes two :ref:`Grafana Dashboards <minio-grafana>` 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 <visualization/grafana/>`.


Available version 2 metrics
---------------------------

The following sections describe the version 2 endpoints and metrics.

.. tab-set::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <alias>` the MinIO deployment

These instructions use :ref:`version 2 metrics. <minio-metrics-v2>`
For more about metrics API versions, see :ref:`Metrics and alerts. <minio-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.
Expand Down
Loading