Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Monitoring
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Working with metrics
      • Getting a list of metrics
      • Downloading metrics
      • Writing custom metrics
      • Export metrics in Prometheus format
    • Working with dashboards
      • Creating dashboards
      • Copying dashboards
      • Adding widgets to a dashboard
      • Deleting widgets from a dashboard
      • Deleting dashboards
    • Working with alerts
      • Creating alerts
      • Creating notification channels
      • Deleting alerts
  • Concepts
    • Overview
    • Data model
    • Visualization
      • Overview
      • Query string
      • Widgets
      • Dashboards
    • Query language
    • Alerting
    • Data decimation
    • Deleting expired metrics (TTL)
    • Quotas and limits
  • Access management
  • Pricing policy
    • Current pricing policy
    • Archive
      • Policy before October 1, 2020
  • API reference
    • Authentication in the API
    • REST
      • Overview
      • MetricsData
        • Overview
        • read
        • write
        • prometheusMetrics
      • MetricsMeta
        • Overview
        • listLabelKeys
        • listLabelValues
        • listMetricNames
        • listMetrics
  • Questions and answers
  1. API reference
  2. REST
  3. MetricsData
  4. prometheusMetrics

prometheusMetrics method

  • HTTP request
  • Headers
  • Query parameters
  • Response

Exports Yandex Monitoring metrics in Prometheus format. All the metrics from the folder are exported.

HTTP request

GET https://monitoring.api.cloud.yandex.net/monitoring/v2/prometheusMetrics
Authorization: Bearer <API key>

Headers

Header Description
Authorization Service account API key. Use Bearer rather than Api-Key as the prefix.

Query parameters

Parameter Description
folderId Required field. ID of the folder you want to export metrics from. Maximum string length: 50 characters.
service ID of the service you want to export metrics from.

Response

HTTP Code: 200 - OK

Metrics from the service in Prometheus format.

# TYPE disk_flush_ops_failed gauge
disk_flush_ops_failed{device="fhm4madvd612357ao6vf", resource_id="fhmpnl2v1rsj4qqp3k0m", resource_type="vm"} 0.0
# TYPE disk_read_ops_in_flight gauge
disk_read_ops_in_flight{device="fhm4madvd612357ao6vf", resource_id="fhmpnl2v1rsj4qqp3k0m", resource_type="vm"} 0.0
# TYPE target_instances_count gauge
target_instances_count{resource_id="cl11231oqcpuqlqvqh83", resource_type="instance_group"} 1.0
...
In this article:
  • HTTP request
  • Headers
  • Query parameters
  • Response
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC