Skip to content

CatoffGaming/server-disk-warning-emailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Disk Space Monitor

This is a script to monitor disk space usage and send email alerts if usage exceeds a specified threshold.

Installation

You can download and install the script using wget or curl.

Using wget

wget https://raw.githubusercontent.com/CatoffGaming/server-disk-warning-emailer/main/disk_space_monitor.sh -O /usr/local/bin/disk_space_monitor.sh
chmod +x /usr/local/bin/disk_space_monitor.sh

Using curl

curl -o /usr/local/bin/disk_space_monitor.sh https://raw.githubusercontent.com/CatoffGaming/server-disk-warning-emailer/main/disk_space_monitor.sh
chmod +x /usr/local/bin/disk_space_monitor.sh

Usage

disk_space_monitor.sh [OPTIONS]

Options

  • -a, --add EMAIL Add a new email to the notification list.
  • -r, --remove EMAIL Remove an email from the notification list.
  • -l, --list List all registered email addresses.
  • -c, --check Check the disk usage and send alerts if necessary.
  • -t, --threshold NUMBER Set a custom disk usage threshold.
  • -s, --setup-postfix Automate the Postfix setup process.
  • -T, --test-email EMAIL Send a test email to verify configuration.
  • -h, --help Display this help message.

Example

disk_space_monitor.sh --add your_email@gmail.com
disk_space_monitor.sh --threshold 10
disk_space_monitor.sh --check

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages