Setting up monitoring for a local YDB cluster
This page provides instructions on how to set up monitoring for a local YDB cluster that is deployed using Quick start.
YDB has multiple system health sensors. Instant sensor values are available in the web interface:
http://localhost:31002/counters/
Linked sensors are grouped into a subgroup (such as counters auth
). To only view sensor values for a particular subgroup, follow a URL like:
http://localhost:31002/counters/counters=<servicename>/
<servicename>
: Sensor subgroup name.
For example, data about the utilization of server hardware resources is available at the URL:
http://localhost:31002/counters/counters=utils
You can collect metric values using Prometheus, a popular open-source tool. YDB sensor values in Prometheus format are available at a URL in the following format:
http://localhost:31002/counters/counters=<servicename>/prometheus
<servicename>
: Sensor subgroup name.
To visualize data, use any system that supports Prometheus, such as Zabbix, Amazon CloudWatch, or Grafana:
Setting up monitoring with Prometheus and Grafana
To set up monitoring for a local single-node YDB cluster using Prometheus and Grafana:
- Install and run Prometheus via a configuration file.
- Install and start the Grafana.
- Create a data source of the
prometheus
type in Grafana and attach it to a running Prometheus instance. - Upload YDB dashboards to Grafana.
To upload dashboards, use the Grafana UI Import tool or run a script. Please note that the script uses basic authentication in Grafana. For other cases, modify the script.
Review the dashboard metric reference.