Collecting and exporting metrics
How do I add a VM's RAM metric?
Yandex Compute Cloud cannot measure vRAM consumption inside the guest operating system because, for this service, memory consumption by the virtual machine is always the same: the one that is allocated the moment it is started.
You can configure collecting custom metrics yourself via the API. In Linux-compatible operating systems, you can do it using a system metrics delivery agent. The agent allows you to collect statistics on the use of most system resources: CPU, RAM, network, and disk.
How do I add a VM disk space metric?
Monitoring cannot access guest operating systems, which is why there is no such metric.
You can configure collecting custom metrics yourself Writing custom metrics via the API. In Linux-compatible operating systems, you can do it using a system metrics delivery agent. The agent allows you to collect statistics on the use of most system resources: CPU, RAM, network, and disk.
How do I collect custom metrics from my app?
Yandex Unified Agent supports metric collection in the Prometheus format and metric conversion to the Monitoring format. That means you can use Unified Agent to collect metrics from any application that provides them in the Prometheus format.
Use a client library
See examples in the following documentation sections:
- Delivering custom application metrics.
- Delivering metrics from HAProxy and other third-party applications.
Can I deliver Yandex Managed Service for Kubernetes cluster metrics to Monitoring?
Yes, you can. To do this, use Metrics Provider. To install it, follow this guide.
How do I deliver third-party app metrics to Monitoring?
To deliver metrics from third-party applications to Monitoring, use Unified Agent with the metrics_pull
input configured. Unified Agent periodically polls the third-party application directly, if the application supports metrics in the Prometheus format, or polls a special export application that provides integration with Prometheus.
You can find an example of how to configure HAProxy metrics delivery in Delivering metrics from HAProxy and other third-party applications.
How do I deliver metrics from hosts outside Yandex Cloud?
Configure authorized keys of service accounts to deliver metrics to Monitoring through Unified Agent.
You can also use this method to send metrics from Yandex Cloud VMs without a linked service account.
How do I view a list of metrics?
To do this, open Metric Explorer and select the desired service.
To get a complete list of metrics belonging to a specific cloud and folder, follow this guide on how to make API requests.
Can I export metrics in Prometheus format?
To export metrics in Prometheus format, use the prometheusMetrics method.
See an example of how to set up metrics export in the documentation.