Skip to content

feat(n8n): add Prometheus ServiceMonitor and PodMonitor#7624

Merged
h0lybyte merged 1 commit intodevfrom
trunk/n8n-keda-verify-1772751791
Mar 5, 2026
Merged

feat(n8n): add Prometheus ServiceMonitor and PodMonitor#7624
h0lybyte merged 1 commit intodevfrom
trunk/n8n-keda-verify-1772751791

Conversation

@h0lybyte
Copy link
Member

@h0lybyte h0lybyte commented Mar 5, 2026

Summary

  • Add ServiceMonitor for n8n main instance — scrapes /metrics on port http (5678)
  • Add PodMonitor for n8n-worker — scrapes /metrics on port health (5678, no Service exists for worker)
  • Both use release: prometheus label for Prometheus operator discovery
  • 30s scrape interval, deployed to n8n namespace

Context

n8n already has N8N_METRICS=true and N8N_METRICS_INCLUDE_QUEUE_METRICS=true enabled (PR #7591), but Prometheus wasn't scraping the endpoint. This completes the observability item (#7) from #7590.

Metrics exposed include queue depth, execution duration, error rates — ready for Grafana dashboards and alerting rules.

Test plan

  • kubectl apply --dry-run=client passes
  • ArgoCD syncs ServiceMonitor + PodMonitor
  • kubectl get servicemonitor,podmonitor -n n8n shows both resources
  • Prometheus Targets page shows n8n and n8n-worker endpoints as UP
  • Query n8n_ metrics in Grafana to verify data collection

Closes observability item in #7590

Add ServiceMonitor for n8n main instance and PodMonitor for
n8n-worker to scrape /metrics on port 5678. Enables Prometheus
to collect queue depth, execution duration, and error rate metrics.
@h0lybyte h0lybyte merged commit ad8d7f6 into dev Mar 5, 2026
@h0lybyte h0lybyte deleted the trunk/n8n-keda-verify-1772751791 branch March 5, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant