Deploy Prometheus on Render
Prometheus is a popular open-source monitoring system that records real-time service metrics to a time-series database. You can query Prometheus directly or visualize your metrics with a tool like Grafana.
This quickstart walks through deploying Prometheus on Render so you can scrape metrics from your other running services.
Prometheus cannot run on a free Render instance, because it requires an attached persistent disk to retain metrics data.
-
Create a new repo from the
render-examples/prometheusGitHub template.- Alternatively, you can clone the repo and push your clone to GitLab or Bitbucket.
-
In the Render Dashboard, click New > Web Service and connect your new repo.
-
Set the service's Language to
Docker.- Render deploys your Prometheus instance as a Docker container based on the official Prometheus image.
-
Select any instance type except Free.
- Prometheus requires an attached persistent disk, which is not supported for free instances.
-
Under Advanced, add a disk to your service with the following values:
-
Click Create Web Service to kick off your first deploy!
When your deploy completes, visit your service's onrender.com URL to open your Prometheus dashboard:

Your Prometheus dashboard is currently accessible to anyone with its URL.
- To secure your dashboard with basic auth, follow the steps in the Prometheus documentation.
- If you don't need to access your dashboard, you can deploy Prometheus as a private service instead of a web service.
Your Prometheus instance is already configured to scrape metrics from itself. Try executing this simple expression to view some initial data:
Now that Prometheus is up and running, let's configure it to scrape metrics from your other services.
Prometheus can communicate over your private network to scrape metrics from your other Render web services and private services running in the same region. To set this up, modify the prometheus.yml file in your repo's root. The file looks like this to start:
Click to show
The single defined job (prometheus) configures Prometheus to scrape metrics from itself.
To scrape metrics from one of your other Render services, uncomment the second block under scrape_configs and customize the following values:
Here's an example configuration for scraping metrics from a service with internal hostname my-api-sr2m running on port 4000:
For more on configuring prometheus.yml, see the Prometheus documentation.
For more on how to build an endpoint for Prometheus to scrape, see the Prometheus data model documentation.
If you're running Grafana on Render, you can create dashboards to visualize your Prometheus data.
Follow the steps in Grafana's Configure Prometheus guide. For the data source URL, provide your Prometheus service's internal hostname and port, such as http://my-prometheus-service:9090.