# Auto-clear server logs via SSH on disk full email alert
This automation reacts instantly to disk space alerts by triggering log cleanup on the affected server — no manual login required. Designed for sysadmins and DevOps teams aiming to reduce downtime and eliminate repetitive tasks.
## Who it´s for
- System administrators managing server log hygiene
- DevOps engineers using Jenkins for task automation
- SRE teams minimizing manual intervention during disk incidents
- VPS/VDS owners facing recurring disk space issues
## What the automation does
- Monitors incoming emails via IMAP for disk utilization alerts
- Extracts the server IP address from the email subject line
- Establishes SSH connection to the target Linux server using predefined credentials
- Executes remote cleanup commands through Jenkins: removes old Nginx/Apache logs, clears APT and Docker caches, runs journalctl vacuum
- Frees up disk space automatically and reliably
## What´s included
- Ready-to-use n8n workflow
- Trigger logic based on disk alert emails
- Integrations with Email (IMAP), Jenkins Server, and Remote Linux Server
- Basic setup and adaptation guide in text format
## Requirements for setup
- Email account with IMAP access enabled
- Operational Jenkins server with network access to target servers
- SSH access to remote Linux servers with permissions to run cleanup scripts
- Credentials stored securely (as environment variables or n8n credentials)
## Benefits and outcomes
- Reduces risk of outages due to full disks
- Saves time by eliminating manual log cleanup across multiple servers
- Accelerates incident response — cleanup starts immediately after alert
- Simplifies management of growing server fleets without scaling infrastructure
- Ensures consistency and safety through standardized cleanup commands
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet