Templates / Send real-time Kubernetes(EKS/GKE/AKS) CPU spike alerts from Prometheus to Slack

Send real-time Kubernetes(EKS/GKE/AKS) CPU spike alerts from Prometheus to Slack

Ready for 3.0

by John Pranay Kumar Reddy ✓ · 1,543 views · created 2025-08-07 · DevOps, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 7 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).

  1. Query Prometheus for CPU Spikes (HTTP Request): calls prometheus-kube-prometheus-prometheus.monitoring:9090
  2. Format Prometheus JSON (Code): runs custom JavaScript code
  3. Check Number of Pods in Group (If): checks a condition and branches into true / false
  4. Format Batched Slack Message (Code): runs custom JavaScript code
  5. Format Single Pod Slack Message (Code): runs custom JavaScript code
  6. 📤 Send Alerts to Slack (HTTP Request): calls slack.com (POST)

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.

  • Still check Always Output Data on multi-output nodes (If/Switch) now adds an empty item only when every output is empty (Check Number of Pods in Group).

Nodes used (4)

From the author

🧾 Summary This workflow monitors Kubernetes pod CPU usage using Prometheus, and sends real-time Slack alerts when CPU consumption crosses a threshold (e.g., 0.8 cores). It groups pods by application name to reduce noise and improve clarity, making it ideal…

Excerpt from John Pranay Kumar Reddy's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.