Skip to content

Instantly share code, notes, and snippets.

@bmgSpark
bmgSpark / df-pushoveralert.sh
Last active July 22, 2020 01:41
bash script to alert via pushover if disk free percentage falls before a certain amount on a particular device [change DevMon var to a different variable to use something different]. Tested on readynas 516
#! /usr/bin/env bash
let notify=75
let criticalnotify=91
let doAct=0
DevMon="/dev/md0"
let percval=`df -h | grep -i $DevMon | awk '{ print +$5 }'`
echo percval = $percval
echo notify = $notify
sSev="INFO"
##check for critical warning -- can be disabled by making $criticalnotify a crazy number