For the complete Render documentation index, fetch https://render.com/llms.txt. Every docs page is also available as Markdown at https://render.com/docs/{slug}.md.

  • Docs
  • Changelog
Sign in
Get started

Deploy Prometheus on Render

View as Markdown
Open in ChatGPT
Open in Claude

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.

1. Initial deploy

  1. Create a new repo from the render-examples/prometheus GitHub template.

    • Alternatively, you can clone the repo and push your clone to GitLab or Bitbucket.
  2. In the Render Dashboard, click New > Web Service and connect your new repo.

  3. Set the service's Language to Docker.

    • Render deploys your Prometheus instance as a Docker container based on the official Prometheus image.
  4. Select any compute plan except Free.

    • Prometheus requires an attached persistent disk, which is not supported for free instances.
  5. Under Advanced, add a disk to your service with the following values:

    Mount Path/var/data
    Size1 GB (You can increase this later as needed.)
  6. Click Deploy web service to kick off your first deploy!

When your deploy completes, visit your service's onrender.com URL to open your Prometheus dashboard:

The Prometheus dashboard for a fresh deploy

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.

2. Configuring metrics scraping

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:

FieldDescription
job_name

A unique name for the job.

For clarity, we recommend using the name of the service you're scraping.

names

An array containing a single string, which is the target service's discovery hostname. This string has the format [internal hostname]-discovery (e.g., myapp-ne5j-discovery).

Prometheus uses the discovery hostname to obtain the IP address for each running instance of the target service. This ensures that you scrape metrics from all instances if you scale a service.

Note that the predefined prometheus job uses a different format for this field, because it pulls in an environment variable to populate the internal hostname.

Learn more about discovery hostnames on Render.

port

The port on which the service exposes its metrics endpoint.

type

This value is always A (Render uses A records for service discovery).

refresh_interval

How often Prometheus should refresh the list of targets.

metrics_path

The path of the target service's metrics endpoint.

The default value is /metrics.

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.

Next steps

Visualizing metrics with Grafana

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.

View as Markdown
Open in ChatGPT
Open in Claude
Deploy Prometheus on Render
  • 1. Initial deploy
  • 2. Configuring metrics scraping
  • Next steps
    • Visualizing metrics with Grafana
    • Home
    • Your first deploy
    • Free instances
    • Platform features by plan
    • Use with coding agents
    • FAQ
    • Templates
      • Migrate from…
        • Heroku
        • Railway
    • Compute plans
    • SandboxesBeta
      • Service types
        • Which to use?
        • Static sites
        • Web services
        • Private services
        • Background workers
        • Cron jobs
        • Workflows
        • Multi-service architectures
      • Data storage
        • Render Postgres
        • Render Key Value (Redis®-compatible)
        • Persistent disks
    • How deploys work
    • Supported languages
    • Git providers (GitHub, etc.)
    • Build pipeline
    • Deploy hooks
    • Monorepo support
    • Troubleshooting deploys
      • Previewing changes
        • Single-service previews
        • Preview environments (multi-service)
      • Docker deploys
        • Overview
        • Deploy a registered image
        • Using secrets
      • Runtime
        • Native runtimes
        • Environment variables & secrets
        • Default environment variables
    • Intro to sandboxes
    • Limits & pricing
      • How to…
        • Create & configure sandboxes
        • Execute commands
        • Upload and download files
        • Manage snapshots
      • Use with…
        • Claude Managed Agents
        • Cursor Cloud Agents
        • OpenAI Agents API
      • SDK/CLI reference
        • TypeScript SDK
        • Python SDK
        • CLI commands
    • Intro to workflows
    • Tutorial
    • Limits & pricing
      • How to…
        • Define tasks
        • Define flowsNew
        • Trigger runs
        • Develop locally
      • SDK reference
        • TypeScript SDK
        • Python SDK
      • Example workflows
        • TypeScript examples
        • Python examples
    • Overview
    • Create & connect
    • Database credentials
    • Extensions
    • Version upgrades
    • Logical replication
    • Legacy instance types
      • Database recovery
        • Recovery & backups
        • High availability
      • Database performance
        • Read replicas
        • Connection pooling
        • Admin apps
        • Repacking tables
        • Troubleshooting performance
    • Regions
    • Inbound IP rules
    • Edge caching
    • WebSockets
    • TLS certificates
      • Custom domains
        • Overview
        • Cloudflare
        • Namecheap
        • Other DNS providers
      • Internal traffic
        • Private network
        • Private links
      • Outbound traffic
        • Default IP ranges
        • Dedicated IP addresses
        • Outbound bandwidth
        • Handling network changes
      • Static site config
        • Custom response headers
        • Redirects & rewrites
    • The Render Dashboard
    • SSH / Shell access
    • Projects & environments
      • Service actions
        • Scaling
        • Rollbacks
        • Maintenance mode
        • One-off jobs
      • Infrastructure as code
        • Blueprints overview
        • render.yaml reference
        • Terraform provider
    • In-dashboard metrics
    • Health checks
    • Uptime best practices
      • Logging
        • In-dashboard logs
        • Log streams (syslog/HTTPS)
      • OpenTelemetry (OTel) metrics
        • Provider setup
        • Metrics reference
      • Notifications
        • Webhooks
        • Email / Slack
    • API keys
    • MCP Server
      • Render CLI
        • Overview
        • Command reference
      • REST API
        • Overview
        • API reference
      • Third-party connections
        • OIDC support
        • Datadog
    • Workspaces, members, & roles
    • Login settings
    • Audit logs
      • Organizations
        • Overview
        • SAML SSO
    • DDoS protection
    • Platform maintenance
      • Compliance
        • Overview
        • HIPAA (US health data)
        • HIPAA best practices
        • Shared responsibility model
        • Pentest policy
    • Heroku vs Render
    • Vercel vs Render
All Systems Operational
© Render Inc. All rights reserved.