feat: added drive_check.sh
This commit is contained in:
parent
ab97aa8f70
commit
30542cc266
1 changed files with 12 additions and 0 deletions
12
drive_check.sh
Executable file
12
drive_check.sh
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
|
||||
line=$(df | grep /mnt/content)
|
||||
value=$(echo "$line" | sed -n 's/.*\b\([0-9]\{1,3\}\)%.*/\1/p')
|
||||
|
||||
if [ "$value" -gt 95 ]; then
|
||||
echo "Wert ist kritisch! Sende notification"
|
||||
|
||||
curl -X POST -H "Content-Type: application/json" 'http://192.168.111.107:8080/v2/send' -d "{\"message\": \"Content Speicherverbrauch ist bei ${value}%!\", \"number\": \"+491775923370\", \"recipients\": [ \"+491775923370\" ]}"
|
||||
else
|
||||
echo "Wert ist unkritisch."
|
||||
fi
|
||||
Loading…
Reference in a new issue