Skip to content

Latest commit

 

History

History
69 lines (50 loc) · 1.1 KB

README.md

File metadata and controls

69 lines (50 loc) · 1.1 KB

disk notify

send notify if disk avail space low

README 中文

🛠️ Settings

it can monit multi mountpoint with specified thresholds
by bash associative array. (key-value pairs)

declare -A mount_thresholds=(
    ["/"]="5120"      # 5 GB in MB
    ["/tmp"]="1024"   # 1 GB in MB
)

supported notify backends

  • telegram bot
  • feishu bot
  • wework bot
  • dingtalk bot
  • pushplus
  • wxpusher
  • serverchan

logs

  • disk_log=disk_hist.log //disk space log
  • send_log=send_hist.log //send noitfy log

notify frequency

  • push_delay=30 //push interval (will adjusted dynamically)

check frequency

  • save_interval=3600 // 1 hour
  • check_interval=300 // 5 min

🚀 Usage

download from https://github.com/yurenchen000/disk_notify/releases/latest
and uncompress it.

// edit conf base on example

cp -pv _disk_notify_global.example _disk_notify_global  
// modify the conf according to your needs  

conf file

  • ./_disk_notify_global
  • ~/.config/_disk_notify

// run in background

nohup ./disk_notify.sh &> disk_notify.out &