How to connect Prometheus
Prometheus can only show a limited amount of monitoring data. If you have a large infrastructure, consider connecting a data source in Grafana® instead
- Issue a static API key in Nebius Token Factory UI.
- Download the latest release of Prometheus for your platform.
-
Extract the contents and switch to the folder with Prometheus:
-
Create the
prometheus.ymlconfiguration file that configures Prometheus to retrieve Monitoring metrics. Use one of the following configurations depending on your Prometheus version:
-
bearer_token: enter the static key that you got earlier. -
metrics_path: specify your project ID in the URL. To get the project ID, go to the Nebius Token Factory UI → Project settings. Under the project’s name, click → Copy project ID. -
match[]: optionally specify which data Prometheus collects by filtering for labels or metric names. For example, to collect only metrics with thediskprefix, set the following value: -
scrape_interval: you can change the interval, but the recommended interval is no less than 15 seconds.
How to connect Grafana data source
To view visualized metrics in Grafana dashboards, connect Grafana to Monitoring and query the data by using PromQL.- Make sure that you have Grafana available, in any of these ways:
- Open Grafana in your browser.
- In the side menu, select Connections → Data sources.
- In the top right corner, click Add new data source.
- Select Prometheus.
- In the Prometheus configuration, enter the following settings:
- Connection → Prometheus server URL:
https://read.monitoring.api.nebius.cloud/projects/<project_ID>/service-provider/prometheus. Specify your project ID in the URL. You can get it on the Project settings page of the web console. - Authentication → HTTP headers: click Add header and enter
Authorizationand the value of the static key that you got earlier.
- Connection → Prometheus server URL:
- Click Save and test. If Prometheus is connected successfully, you should see the “Successfully queried the Prometheus API” message.