A Prometheus exporter for collecting metrics from Render.com services.
This exporter connects to the Render.com API and exposes various metrics about your services in Prometheus format, including:
- CPU usage
- Memory usage
- Instance count
- Total service count
- Node.js (v22 or higher recommended)
- A Render.com API token
npm install
export RENDER_API_TOKEN=your_render_api_token
export NODE_ENV=development
npm run watch
If AUTH_BEARER_TOKEN
is set, the exporter will require the token in an
Authorization header to server /metrics
If both the AUTH_USERNAME
and AUTH_PASSWORD
variabeles are present, and
bearer auth is not enabled, the exporter will require basic authentication to
serve /metrics
.
If either is absent or empty, it will serve unencrypted.
- Create a new Web Service on Render.com
- Connect it to the public repository at
https://github.com/readmeio/render_exporter
- Set the build command to
npm ci --include dev && npm run build
- Set the run command to
npm run start
- Add environment variables for configuration
- Deploy
The exporter is configured using environment variables:
Variable | Description | Required | Default |
---|---|---|---|
RENDER_API_TOKEN |
Your Render.com API token | Yes | - |
PORT |
Port to run the exporter on | No | 3000 |
NODE_ENV |
Environment (development, production, test) | Yes | - |
SERVICE_NAME_FILTER |
Filter services by name | No | "" (all services) |
AUTH_USERNAME |
Basic auth username | No | - |
AUTH_PASSWORD |
Basic auth password | No | - |
AUTH_BEARER_TOKEN |
Bearer auth token | Noe | - |
The exporter exposes the following metrics at the /metrics
endpoint:
render_service_count
: Total number of servicesrender_service_instance_count_count
: Current number of instances for each servicerender_service_cpu_usage_percent
: CPU usage for each servicerender_service_memory_usage_bytes
: Memory usage for each service in bytes
Add the following to your prometheus.yml
:
scrape_configs:
- job_name: "render"
scrape_interval: 60s
static_configs:
- targets: ["your-exporter-host:3000"]
MIT