n8n

How to Monitor SSH Email Server Health Alerts?

Keep an eye on your server without logging in all the time. This setup checks CPU, RAM, and Disk every 15 minutes and sends an email if any one of them goes past a safe limit. It suits small IT teams, solo founders, and anyone running a VPS or small cluster.

A schedule starts the checks on a timer. Three SSH commands run on the server to read CPU use, memory load, and disk fill. The results are joined into one record with a merge step using a simple SQL query. A check step compares each value to a threshold that you can change. If any metric meets or exceeds the limit, an email gets sent with clean numbers rounded to two decimals. The alert shows CPU, RAM, and Disk in one message, so you know what is wrong in seconds.

All you need is SSH access to the server and an SMTP account to send email. Update the email addresses in the send step and set your own limits in the check step. Expect fewer manual checks, faster response to spikes, and less downtime. Good fits include production VPS, staging boxes, and budget servers where early alerts avoid overload.

What are the key features?

  • Schedule Trigger runs every 15 minutes to scan your server on time.
  • SSH steps read CPU, RAM, and Disk using simple shell commands on the host.
  • Merge step combines all readings into one record with a clear structure.
  • If step checks values against a set threshold and alerts only when needed.
  • Email step sends a clear subject and body with metrics rounded to two decimals.
  • Editable thresholds let you set different limits for CPU, RAM, and Disk.
  • SMTP and SSH credentials are stored in n8n for secure reuse across nodes.

What are the benefits?

  • Cut manual server checks from 30 minutes a day to a quick 2 minute inbox review.
  • Spot resource spikes within 15 minutes to reduce downtime risk.
  • See CPU, RAM, and Disk in one email for faster triage and action.
  • Use standard SSH with no agents to install or maintain.
  • Tune thresholds per metric to match your real workload and reduce noise.
  • Scale to more servers by duplicating the SSH check steps.

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. Open the Schedule Trigger and confirm the interval is 15 minutes or set your preferred timing.
  3. In n8n Cloud, go to Credentials and create a new SSH Password credential. Enter host, port, username, and password for your server. Give it a clear name like Prod VPS SSH and save.
  4. Open each SSH node named Check CPU usage, Check RAM usage, and Check Disk usage. In the credential dropdown, pick the SSH credential you created. Save after each change.
  5. Test each SSH node by clicking Execute Node. Make sure you get a numeric value back for CPU, RAM, and Disk. Fix firewall or login issues if a node fails.
  6. Open the Merge check results node and run it once to see a single item with CPU, RAM, and Disk fields. This confirms the join is working.
  7. Open the Check results against thresholds node. Set the limits you want for CPU, RAM, and Disk. The default is 80. The combine operation is any so one high metric will trigger an alert.
  8. In n8n Cloud Credentials, create a new SMTP credential for your email service. Add host, port, secure setting, username, and password. Name it clearly such as SMTP Alerts and save.
  9. Open the Send Email node. Choose your SMTP credential. Set From and To addresses you can access. Keep the subject and body or adjust the wording as needed.
  10. Run the workflow once with a lower threshold to force an alert. Check your inbox and spam folder to confirm delivery. Restore your real threshold after testing.
  11. Activate the workflow. Watch the Executions list in n8n to confirm runs every 15 minutes and emails only when a metric crosses the limit.
  12. Troubleshooting tips: ensure your server allows SSH from n8n IPs, verify top, awk, and df exist on the host, and check SMTP credentials and ports if email fails.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.