Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Monitoring
  • Getting started
    • All guides
      • Metrics overview
      • Delivering Linux system metrics
      • Delivering custom application metrics
      • Delivering metrics from HAProxy and other third-party applications
      • Delivering metrics from hosts outside Yandex Cloud
      • Writing custom metrics via the API
      • Getting a list of metrics
      • Downloading metrics
      • Exporting metrics in Prometheus format
  • Access management
  • Terraform reference
  • Release notes
  1. Step-by-step guides
  2. Working with metrics
  3. Getting a list of metrics

Getting a list of metrics

Written by
Yandex Cloud
Updated at April 28, 2025

To get a list of metrics that belong to a specific cloud and folder, use the listMetrics method.

Getting startedGetting started

To follow the examples in this section:

  1. Make sure you have installed cURL that is used in the examples.
  2. Get the ID of the folder for which you have the monitoring.viewer role or higher.
  3. Get an IAM token:
    • Guide for users with a Yandex account.
    • Guide for a service account.
    • Guide for a federated account.

Request exampleRequest example

Send the request and save the response to a file, e.g., output.json:

export IAM_TOKEN=CggaATEVAgA...
curl \
  --header "Content-Type: application/json" \
  --header "Authorization: Bearer ${IAM_TOKEN}" \
  --get 'https://monitoring.api.cloud.yandex.net/monitoring/v2/metrics/?folderId=b1gucmd4tma1********&pageSize=200' \
  --data-urlencode 'selectors={service="managed-clickhouse", resource_id="c9q5e2a9i24p********"}' > output.json

Here is an example of a response to a request that retrieves a list of Managed Service for ClickHouse® metrics for a resource:

output.json:

{
   "metrics" : [
      {
         "labels" : {
            "dc" : "rc1c",
            "host" : "rc1c-dqd0h0i0********.mdb.yandexcloud.net",
            "node" : "replica",
            "resource_id" : "c9q5e2a9i24p********",
            "resource_type" : "cluster",
            "service" : "managed-clickhouse",
            "shard" : "c9qdstaf9lfg********"
         },
         "name" : "net.packets_sent",
         "type" : "DGAUGE"
      },
      {
         "labels" : {
            "dc" : "rc1c",
            "host" : "rc1c-dqd0h0i0********.mdb.yandexcloud.net",
            "node" : "replica",
            "resource_id" : "c9q5e2a9i24p********",
            "resource_type" : "cluster",
            "service" : "managed-clickhouse",
            "shard" : "c9qdstaf9lfg********"
         },
         "name" : "disk.free_inodes",
         "type" : "DGAUGE"
      }
    ]
}

Where:

  • resource_id: Resource ID.
  • metrics: List of metrics.

ClickHouse® is a registered trademark of ClickHouse, Inc.

Was the article helpful?

Previous
Writing custom metrics via the API
Next
Downloading metrics
© 2025 Direct Cursus Technology L.L.C.