|
| 1 | +.. _tcm_cluster_metrics: |
| 2 | + |
| 3 | +Viewing cluster metrics |
| 4 | +======================= |
| 5 | + |
| 6 | +.. include:: index.rst |
| 7 | + :start-after: ee_note_tcm_start |
| 8 | + :end-before: ee_note_tcm_end |
| 9 | + |
| 10 | +In |tcm_full_name|, you can view metrics of connected clusters in real time on the |
| 11 | +**Cluster** > **Cluster metrics** page. The list of metrics that Tarantool exposes |
| 12 | +is provided in the :ref:`metrics-reference`. |
| 13 | + |
| 14 | +Metrics are displayed one by one. To view a metric, select it in the drop-down list |
| 15 | +at the top of the page. Then, choose a way to visualize it: |
| 16 | + |
| 17 | +- **Chart**: a time series chart with the metric values displayed as lines. |
| 18 | +- **Table**: a table where the metric values are displayed as numbers in table cells. |
| 19 | + |
| 20 | +Once you select a metric, |tcm| starts visualizing its current values, updating them |
| 21 | +once per second. To pause the visualization, click the button on the left from |
| 22 | +the metrics selector. To stop the visualization, clear the metric selection. |
| 23 | + |
| 24 | + |
| 25 | +.. _tcm_cluster_metrics_prometheus: |
| 26 | + |
| 27 | +Monitoring metrics with Prometheus |
| 28 | +---------------------------------- |
| 29 | + |
| 30 | +To allow collecting cluster metrics with external systems, such as Prometheus, |
| 31 | +|tcm| provides HTTP endpoints at ``/api/metrics/<clusterId>``. |
| 32 | + |
| 33 | +.. note:: |
| 34 | + |
| 35 | + Cluster IDs are shown in the cluster selection dialog that opens when you click |
| 36 | + **Cluster** at the top of the left navigation pane. |
| 37 | + |
| 38 | +To access such an endpoint, a request must be authorized with an :ref:`API token <tcm_api_tokens>` |
| 39 | +that has a ``cluster.metrics`` permission on the target cluster. |
| 40 | + |
| 41 | +Below is an example of a Prometheus scrape configuration that collects metrics of |
| 42 | +a Tarantool cluster from |tcm|: |
| 43 | + |
| 44 | +.. code-block:: yaml |
| 45 | +
|
| 46 | + - job_name: "tarantool" |
| 47 | + static_configs: |
| 48 | + - targets: ["127.0.0.1:8080"] |
| 49 | + metrics_path: "/api/metrics/00000000-0000-0000-0000-000000000000" |
| 50 | + bearer_token: QgMPZ22JZ3uw7n0QTbqYGAQDmNDs1JnTkhaC1OlQzWM3utmpV78b23GG97zp8YE3 |
0 commit comments