Monitoring a Kafka cluster
In Kafka Managed Databases, you can track the status of the cluster.
To evaluate the overall status of the cluster, view its status.
For a more detailed analysis, you can:
- view the status of cluster nodes — as charts in the control panel;
- export cluster node metrics in Prometheus format.
When analyzing charts, note that the time in the Control Panel corresponds to the time on your device and does not depend on the region where the cluster is located.
For example, you have created a cluster in Tashkent, in the uz-1 pool. On the device from which you logged into the control panel, the Moscow time zone is set. The time on metrics charts will be displayed in the Moscow time zone.
View cluster status
-
In the control panel, on the top menu click Products and select Managed Databases.
-
Open the Active tab.
-
View the status in the cluster row.
View cluster node status
- In the control panel, on the top menu click Products and select Managed Databases.
- Open the Active tab.
- Open the cluster page → Monitoring tab.
- In the Cluster monitoring block, view the available cluster node metrics.
Cluster node metrics in the control panel
Export metrics in Prometheus format
Historical information is unavailable for clusters — metrics are requested only in real-time. A list of all metrics that are supported in managed databases and their description can be viewed in the Metrics in Prometheus format table.
1. Get a token
The token provides access to metrics for all clusters in a project in a single pool.
-
In the control panel, on the top menu click Products and select Managed Databases.
-
Open the Active tab.
-
Open the cluster page → Monitoring tab.
-
In the Prometheus tokens block, click Create token. The token will be generated automatically.
-
Copy the token. To do this, in the token row, click .
2. Get metrics in Prometheus format
Configuration file
CLI
-
Add to the Prometheus configuration file:
scrape_configs:- job_name: get-metrics-from-dbaasscrape_interval: 1mstatic_configs:- targets:- '<domain>'scheme: httpsauthorization:type: Bearercredentials: <token>Specify:
<domain>is the Managed Databases API domain. This is the part of the URL used to access the API withouthttps://and/v1, for exampleru-3.dbaas.selcloud.ru. The URL depends on the region and pool, and can be found in the list of URLs;<token>— the token you copied when getting the token in step 5.
-
Open the page in your browser where Prometheus-format metrics will be available:
http://<ip_address>:9090/targetsSpecify
<ip_address>— the IP address where Prometheus is installed. -
Set up monitoring and alerts for database clusters yourself.
Metrics in Prometheus format
metrics in Prometheus format are provided for all clusters. A specific cluster can be found by the database cluster ID in the ds_id label.