Execute a command that gives the hard disk memory used on the host machine

For n8n, this automated workflow checks hard disk memory usage twice daily at 9 AM and 4 PM. If usage exceeds 80%, it sends an alert via Twilio, ensuring timely awareness of storage issues to prevent potential disruptions.

7/8/2025
5 nodes
Medium
schedulemediumexecutecommandtwilionoopautomationlogicconditional
Categories:
Communication & MessagingSchedule TriggeredMedium Workflow
Integrations:
ExecuteCommandTwilioNoOp

Target Audience

  • System Administrators: Ensure efficient disk space management and avoid downtime due to full disks.
    - DevOps Engineers: Automate monitoring of disk usage as part of CI/CD pipelines.
    - IT Support Teams: Receive timely alerts about potential disk space issues to assist users effectively.
    - Businesses: Maintain operational efficiency by preventing server outages caused by insufficient disk space.
  • Problem Solved

    This workflow automatically monitors the hard disk usage on the host machine and alerts users when the disk space exceeds 80%. This proactive approach helps prevent potential issues related to insufficient disk space, ensuring smooth operations and minimizing downtime.

    Workflow Steps

  • Cron Scheduler: This node triggers the workflow at specified times, specifically at 9 AM and 4 PM daily.
    2. Execute Command: Runs a shell command to check the current disk usage percentage. The command used is df -k / | tail -1 | awk '{print $5}', which retrieves the percentage of disk space used.
    3. IF Condition: Evaluates the output of the command. If the disk usage is greater than 80%, it proceeds to the next step; otherwise, it ends without action.
    4. Twilio Notification: If the disk usage exceeds 80%, a message is sent via Twilio to a specified phone number, alerting the user with the message: "Your hard disk space is filling up fast! Your hard disk is [current usage] full."
    5. No Operation (NoOp): This serves as a placeholder for any actions that could be taken if the disk usage is under control.
  • Customization Guide

  • Change Alert Threshold: Modify the value in the IF node to adjust the disk usage percentage that triggers alerts.
    - Schedule Frequency: Update the Cron node to change the times or add more triggers based on your needs.
    - Modify Notification Details: Alter the message content in the Twilio node to include additional information or change the recipient's phone number.
    - Command Customization: Adjust the command in the Execute Command node to check different directories or use other monitoring commands as needed.