Monitor Kubernetes services & pods with Prometheus and send alerts to Slack
Ready for 3.0What this workflow does
This workflow has 16 nodes and runs on a schedule (every minute). It uses only n8n's built-in nodes. It also calls prometheus-kube-prometheus-prometheus.monitoring:9090 and slack.com over HTTP.
How it runs
Trigger: On a schedule (every minute).
- Current endpoints (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
- Endpoints 5m ago (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
- Pods Running State (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
- Containers Not Ready (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
- CrashLoopBackOff / Termination Reason (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
- Pod Restart Spike (last 5m) (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
- Pod Pending State (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
- Map Prometheus results into namespace/service (Code): runs custom JavaScript code
- Map Prometheus results into namespace/service (Code): runs custom JavaScript code
- Merge: merges the data from its input branches
…plus 5 more steps. See the full node list below.
HTTP calls to: prometheus-kube-prometheus-prometheus.monitoring:9090, slack.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (4)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Merge
n8n-nodes-base.merge
From the author
🧩 Short Summary Proactively alert to service endpoint changes and pod/container issues (Pending, Not Ready, Restart spikes) using Prometheus metrics, formatted and sent to Slack. 🗂️ Category DevOps / Monitoring & Observability 🏷️ Tags kubernetes,…