Monitor n8n: health checks, Prometheus metrics and alerts
How to monitor a self-hosted n8n: /healthz and readiness checks, the Prometheus /metrics endpoint, failed-run metrics, alerts, and OpenTelemetry traces.

To monitor a self-hosted n8n, point an uptime checker at /healthz/readiness (200 means n8n is up and its database is connected and migrated), and set N8N_METRICS=true so Prometheus can scrape /metrics, which includes how long each workflow run took and whether it succeeded or failed. Add an error workflow for alerts on individual failures, and OpenTelemetry traces if you need to follow one execution through your stack. Keep /metrics off the public internet: it answers without a login.
The short version:
| Check | Endpoint or setting | What it tells you |
|---|---|---|
| Is the process up? | /healthz | 200 if n8n is reachable; says nothing about the database |
| Can it serve traffic? | /healthz/readiness | 200 if the database is connected and migrated |
| How is it doing? | /metrics with N8N_METRICS=true | Prometheus metrics: run durations and status, memory, event loop lag, active workflows |
| Did a workflow fail? | An error workflow, or the metric status="failed" | An alert per failed run, or a failure rate over time |
| Where did a run spend its time? | OpenTelemetry, N8N_OTEL_ENABLED=true | Traces per workflow and node (Preview) |
We checked the endpoints and metrics below on n8n 2.47.5, the current stable release, with a local instance and two webhook workflows, one of which fails on purpose.
Health checks: /healthz and /healthz/readiness
n8n's monitoring docs describe two health endpoints:
/healthzreturns 200 when the instance is reachable. It "doesn't indicate DB status". It works on self-hosted and Cloud./healthz/readinessreturns 200 only when the database is connected and migrated, so the instance is ready to accept traffic.
Both answered {"status":"ok"} with status 200 in our test:
curl -s https://n8n.example.com/healthz
# {"status":"ok"}
curl -s https://n8n.example.com/healthz/readiness
# {"status":"ok"}Use /healthz for a liveness check (restart the container if it stops answering) and /healthz/readiness for uptime monitoring and load balancers, because a running process with a broken database connection still passes /healthz. The path can be changed with N8N_ENDPOINT_HEALTH (default healthz), per the endpoints reference.
In queue mode, the docs note that workers don't serve the health endpoint by default. Set QUEUE_HEALTH_CHECK_ACTIVE=true on the workers to turn it on.
Turn on Prometheus metrics
The /metrics endpoint is off by default. Turn it on with one variable:
services:
n8n:
environment:
N8N_METRICS: "true"Per the Prometheus docs page, n8n uses the prom-client library, and both main and worker instances can expose metrics. The endpoint is available on every self-hosted edition, but not on n8n Cloud.
What you get
With N8N_METRICS=true (and the workflow ID label described below), our instance exposed 71 n8n_ metric families (the prefix is set by N8N_METRICS_PREFIX). The useful ones for a first dashboard:
n8n_workflow_execution_duration_seconds: a histogram of run durations withstatusandmodelabels. After three successful and two failing webhook runs, its_countshowedstatus="success"3 andstatus="failed"2, both withmode="webhook".n8n_active_workflow_count: the number of active workflows.n8n_nodejs_eventloop_lag_secondsand then8n_nodejs_heap_size_*metrics: event loop lag and memory, the first signs of an overloaded instance.n8n_process_resident_memory_bytesandn8n_process_cpu_seconds_total: process memory and CPU.n8n_version_info: the running version as labels, handy to spot instances that missed an update. Ours readversion="v2.47.5".
The Node.js and process metrics come from N8N_METRICS_INCLUDE_DEFAULT_METRICS, which defaults to true.
Labels and extra metric groups
The endpoints reference lists the switches, all false by default except the default metrics. The ones most people want:
N8N_METRICS_INCLUDE_WORKFLOW_ID_LABEL: adds aworkflow_idlabel to workflow metrics. With it on, we could see which workflow failed (workflow_id="..."on the failed series). Leave it off if you have thousands of workflows, since every label value is a new time series.N8N_METRICS_INCLUDE_QUEUE_METRICS: job counts for queue mode (active, completed, failed), exposed on the main instances and refreshed everyN8N_METRICS_QUEUE_METRICS_INTERVALseconds (default20).N8N_METRICS_INCLUDE_API_ENDPOINTS, with optional path, method and status code labels: metrics for API calls.N8N_METRICS_INCLUDE_NODE_TYPE_LABELandN8N_METRICS_INCLUDE_CREDENTIAL_TYPE_LABEL: node and credential type labels.- Newer groups for the durable scheduler, polling triggers, system tasks and SSRF protection, each with its own
N8N_METRICS_INCLUDE_*variable.
Scrape it with Prometheus and graph it in Grafana
n8n's Grafana page gives the Prometheus scrape job:
scrape_configs:
- job_name: n8n
static_configs:
- targets:
- n8n:5678
metrics_path: /metricsUse the address Prometheus can reach on your internal network, such as the Compose service name. Then add Prometheus as a Grafana data source (Connections > Data sources > Add new data source > Prometheus). n8n also publishes reusable Grafana dashboards in its n8n-observability repository, according to the same page.
Alerts that are worth having
Monitoring only helps if something tells you when it breaks. Three alerts cover most self-hosted instances:
- Readiness fails. Any uptime checker that calls
/healthz/readinessevery minute or so. Our website uptime monitor template can check that URL from another n8n instance; a check from outside the server is what you want, because it still works when this n8n is down. - Failures rise. In Prometheus, alert when the rate of
n8n_workflow_execution_duration_seconds_count{status="failed"}goes above what's normal for you. The exact threshold depends on your workflows. - A specific workflow fails. An error workflow with the Error Trigger tells you which run failed and why. Our error handling guide sets one up, and the failed-runs digest template sends one Telegram summary a day instead of one message per failure.
Add disk space to the list if you self-host on a small server: execution data grows until pruning removes it. Our guide to pruning execution data explains the defaults.
OpenTelemetry traces (Preview)
For a view inside each run, n8n can export OpenTelemetry traces for workflow and node executions. The docs mark it as Preview since n8n 2.19.0 and advise against relying on it in production. The basics:
N8N_OTEL_ENABLED=true
N8N_OTEL_EXPORTER_OTLP_ENDPOINT=http://<your-collector-host>:4318- n8n appends
/v1/tracesto the endpoint, so give it the collector's base URL. - Owners and admins can also configure it in Settings > OpenTelemetry (from 2.27.0), and gRPC is supported from 2.39.0.
- By default only production executions are traced;
N8N_OTEL_TRACES_PRODUCTION_ONLY=falseincludes manual runs, andN8N_OTEL_TRACES_SAMPLE_RATE(0 to 1) reduces volume.
We didn't test tracing for this guide.
Next steps
- Set the rest of your production configuration: n8n environment variables for production.
- Scale out once the metrics show you need it: n8n queue mode.
- Keep the instance current, with a health check after every update: update self-hosted n8n safely.
Sources
Editorial team
The then8nblog editorial team researches every article from n8n's release notes, documentation and source code, states the n8n version each guide was tested on, and has every post reviewed by a human editor before it goes live.



