You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ydb/docs/en/core/devops/manual/monitoring.md
+52-7Lines changed: 52 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,37 @@
1
1
# Setting up monitoring for a local {{ ydb-short-name }} cluster
2
2
3
-
This page provides instructions on how to set up monitoring for a local {{ ydb-short-name }} cluster that is deployed using [Quick start](../../quickstart.md).
3
+
This page provides instructions on how to set up monitoring for a {{ ydb-short-name }} cluster.
4
4
5
5
{{ ydb-short-name }} has multiple system health sensors. Instant sensor values are available in the web interface:
6
6
7
7
```http
8
-
http://localhost:31002/counters/
8
+
http://<ydb-server-address>:<ydb-port>/counters/
9
9
```
10
10
11
+
* <ydb-server-address> – the {{ ydb-short-name }} server address.
12
+
13
+
For a local {{ ydb-short-name }} cluster that is deployed using [Quick start](../../quickstart.md) use the `localhost` address.
You can collect metric values using [Prometheus](https://prometheus.io/), a popular open-source tool. {{ ydb-short-name }} sensor values in [Prometheus format](https://prometheus.io/docs/instrumenting/exposition_formats/) are available at a URL in the following format:
@@ -36,12 +42,51 @@ To visualize data, use any system that supports Prometheus, such as [Zabbix](htt
36
42
37
43
## Setting up monitoring with Prometheus and Grafana {#prometheus-grafana}
38
44
39
-
To set up monitoring for a local single-node {{ ydb-short-name }} cluster using [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/):
45
+
To set up monitoring for a {{ ydb-short-name }} cluster using [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/):
40
46
41
47
1.[Install and run](https://prometheus.io/docs/prometheus/latest/getting_started/#downloading-and-running-prometheus) Prometheus via a [configuration file](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/grafana_dashboards/local_ydb_prometheus.yml).
48
+
49
+
50
+
Edit the configuration file before running Prometheus:
51
+
52
+
1. In the `targets` section specify addresses of all servers of the {{ ydb-short-name }} cluster and ports for each nodes (static and dynamic) that runs on the server.
53
+
54
+
For example, for the {{ ydb-short-name }} cluster that contains three servers, each server running one static and two dynamic nodes, specify nine addresses for all sensor subgroups, except for the disk subgroups (for disk sensor subgroups, specify only static node addresses):
55
+
56
+
```json
57
+
static_configs:
58
+
- targets:
59
+
- ydb-s1.example.com:8765
60
+
- ydb-s1.example.com:8766
61
+
- ydb-s1.example.com:8767
62
+
- ydb-s2.example.com:8765
63
+
- ydb-s2.example.com:8766
64
+
- ydb-s2.example.com:8767
65
+
- ydb-s3.example.com:8765
66
+
- ydb-s3.example.com:8766
67
+
- ydb-s3.example.com:8767
68
+
```
69
+
70
+
For a local single-node {{ ydb-short-name }} cluster, specify one address in the `targets` section:
71
+
72
+
```json
73
+
- targets: ["localhost:8765"]
74
+
```
75
+
76
+
1. If necessary, specify certificates in the `tls_config` section:
77
+
78
+
```json
79
+
tls_config:
80
+
ca_file: '<ydb-prometheus-ca-file>'
81
+
```
82
+
83
+
Skip this step for a local single-node {{ ydb-short-name }} cluster.
84
+
42
85
1. [Install and start](https://grafana.com/docs/grafana/latest/getting-started/getting-started/) the Grafana.
86
+
43
87
1. [Create](https://prometheus.io/docs/visualization/grafana/#creating-a-prometheus-data-source) a data source of the `prometheus` type in Grafana and attach it to a running Prometheus instance.
44
-
1. Upload [{{ ydb-short-name }} dashboards](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/grafana_dashboards/) to Grafana.
88
+
89
+
1. Upload [{{ ydb-short-name }} dashboards](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/helm/ydb-prometheus/dashboards) to Grafana.
45
90
46
91
To upload dashboards, use the Grafana UI [Import](https://grafana.com/docs/grafana/latest/dashboards/export-import/#import-dashboard) tool or run a [script](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/grafana_dashboards/local_upload_dashboards.sh). Please note that the script uses [basic authentication](https://grafana.com/docs/grafana/latest/http_api/create-api-tokens-for-org/#authentication) in Grafana. For other cases, modify the script.
На этой странице рассказано, как настроить мониторинг локального однонодового кластера YDB, запущенного с помощью инструкции по [Быстрому началу работы](../../quickstart.md).
3
+
На этой странице рассказано, как настроить мониторинг кластера YDB.
4
4
5
5
{{ ydb-short-name }} предоставляет множество сенсоров состояния системы. Мгновенные значения сенсоров можно посмотреть в веб-интерфейсе:
6
6
7
7
```text
8
-
http://localhost:31002/counters/
8
+
http://<ydb-server-address>:<ydb-port>/counters/
9
9
```
10
10
11
+
где:
12
+
13
+
- <ydb-server-address> – адрес сервера {{ ydb-short-name }}.
14
+
15
+
Для локального однонодового кластера YDB, запущенного с помощью инструкции по [Быстрому началу работы](../../quickstart.md), используйте адрес `localhost`.
16
+
17
+
- <ydb-port> – порт {{ ydb-short-name }}. Значение по умолчанию: 8765.
18
+
11
19
Связанные сенсоры объединены в подгруппы (например `counters auth`). Чтобы посмотреть значения сенсоров только определенной подгруппы, перейдите по URL следующего вида:
Для сбора значений метрик вы можете использовать популярный инструмент с открытым исходным кодом [Prometheus](https://prometheus.io/). Значения сенсоров {{ ydb-short-name }} в [формате Prometheus](https://prometheus.io/docs/instrumenting/exposition_formats/) доступны по URL следующего вида:
## Настройка мониторинга с помощью Prometheus и Grafana {#prometheus-grafana}
38
46
39
-
Чтобы настроить мониторинг локального однонодового кластера {{ ydb-short-name }} с помощью [Prometheus](https://prometheus.io/) и [Grafana](https://grafana.com/):
47
+
Чтобы настроить мониторинг кластера {{ ydb-short-name }} с помощью [Prometheus](https://prometheus.io/) и [Grafana](https://grafana.com/):
40
48
41
49
1.[Установите и запустите](https://prometheus.io/docs/prometheus/latest/getting_started/#downloading-and-running-prometheus) Prometheus, используя [файл конфигурации](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/grafana_dashboards/local_ydb_prometheus.yml).
50
+
51
+
Перед использованием, файл конфигурации Prometheus необходимо отредактировать:
52
+
53
+
1. В секции `targets` укажите адреса всех серверов кластера {{ ydb-short-name }} и порты каждого из узлов (статического и динамического), работающих на сервере.
54
+
55
+
Например, для кластера из трёх серверов, где на каждом сервере работает один статический и два динамических узла, необходимо прописать девять адресов для всех подгрупп сенсоров, кроме дисковых (для дисковых подгрупп сенсоров необходимо указать только адреса статических узлов):
56
+
57
+
```json
58
+
static_configs:
59
+
- targets:
60
+
- ydb-s1.example.com:8765
61
+
- ydb-s1.example.com:8766
62
+
- ydb-s1.example.com:8767
63
+
- ydb-s2.example.com:8765
64
+
- ydb-s2.example.com:8766
65
+
- ydb-s2.example.com:8767
66
+
- ydb-s3.example.com:8765
67
+
- ydb-s3.example.com:8766
68
+
- ydb-s3.example.com:8767
69
+
```
70
+
71
+
Для локального однонодового кластера YDB, в секции `targets` прописывается один адрес:
72
+
73
+
```json
74
+
- targets: ["localhost:8765"]
75
+
```
76
+
77
+
1. При необходимости, укажите сертификат в секции `tls_config`:
78
+
79
+
```json
80
+
tls_config:
81
+
ca_file: '<ydb-prometheus-ca-file>'
82
+
```
83
+
84
+
Пропустите этот шаг для локального однонодового кластера {{ ydb-short-name }}.
85
+
42
86
1. [Установите и запустите](https://grafana.com/docs/grafana/latest/getting-started/getting-started/) Grafana.
43
87
1. [Создайте](https://prometheus.io/docs/visualization/grafana/#creating-a-prometheus-data-source) источник данных с типом `prometheus` в Grafana и подсоедините его к запущенному экземпляру Prometheus.
44
-
1. Загрузите [дашборды {{ ydb-short-name }}](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/grafana_dashboards/) в Grafana.
88
+
1. Загрузите [дашборды {{ ydb-short-name }}](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/helm/ydb-prometheus/dashboards) в Grafana.
45
89
46
90
Вы можете загрузить дашборды с помощью инструмента [Import](https://grafana.com/docs/grafana/latest/dashboards/export-import/#import-dashboard) Grafana UI или выполнить [скрипт](https://github.com/ydb-platform/ydb/tree/main/ydb/deploy/grafana_dashboards/local_upload_dashboards.sh). Обратите внимание, что скрипт использует [базовую аутентификацию](https://grafana.com/docs/grafana/latest/http_api/create-api-tokens-for-org/#authentication) в Grafana. Для других случаев модифицируйте скрипт.
0 commit comments