Reading and visualizing metrics with Grafana
Written by
Updated at October 29, 2025
Yandex Managed Service for Prometheus® supports the Prometheus data source
Connecting a data source
- In the management console
, go to the folder that stores your data. - Create a service account with the
monitoring.viewerrole for the selected folder. - Create an API key for the service account.
- Open your Grafana homepage.
- In the main menu, select Configuration → Data Sources.
- Click Add data source.
- Under Time series databases, select Prometheus.
- In the Name field, enter the data source name.
- In the URL field under HTTP, specify the previously obtained endpoint.
- Under Custom HTTP headers, click Add Header and add an authorization header. In the Header field, enter
Authorizationand in the Value field,Bearer <API_key>. - Click Save & test. You should see a message saying
The data source is working.
Error examples
| Error code | Description | Error message |
|---|---|---|
404 |
Endpoint not found. Make sure the configuration specifies the correct url. |
not_found: workspace not found: monb1piptmdo******** |
401 |
Service account not found. Make sure the configuration specifies the correct API key. | auth: cannot authenticate by either token or api-key, cause: UNAUTHENTICATED: The token is invalid |
403 |
No read permissions. Make sure the service account has the monitoring.viewer role for the selected folder. |
auth: PERMISSION_DENIED: Permission denied |
429 |
Number of HTTP API read requests per second quota exceeded | execution: too many requests: monb1piptmdo******** |
400 |
Too many lines returned in the response. Try refining your query. | bad_data: Too many metrics are loaded by selectors {job=='grafana'}, expected not more than: 10000 |
Current limitations
Yandex Managed Service for Prometheus® works on TCP port 443. Its public IP address is 158.160.59.216. This address may change over time. To avoid losing access to the service, we recommend using additional addresses from the list of available ones.
The Prometheus HTTP API
/api/v1/query/api/v1/query_range/api/v1/labels/api/v1/<label_name>/values/api/v1/series
The following limitations apply:
- The
timeoutparameter is not supported and is ignored. - The
startandendparameters are not supported and are ignored for the/api/v1/labels,/api/v1/<label_name>/values, and/api/v1/seriesrequests. - The maximum number of selectors you can provide in the
match[]parameter is 8.
- The maximum number of time series you can get metadata for using the
/api/v1/seriesquery is 10,000. - The maximum number of time series you can read per one
/api/v1/queryor/api/v1/query_rangequery is 10,000.
--query.lookback-deltais set to5m.
© 2025 Linux Foundation. All rights reserved. The Linux Foundation owns and uses registered trademarks. For a list of Linux Foundation trademarks, see Trademark Usage