zabbix-helpers/lxc_fs_monitoring/get_fs_status.sh

14 lines
307 B
Bash
Raw Normal View History

2024-11-06 10:16:00 +03:00
#!/bin/bash
case "$2" in
available)
echo $(/bin/df | /bin/grep "$1"| /usr/bin/awk '{print $4}')
;;
usage)
echo $(/bin/df | /bin/grep "$1"| /usr/bin/awk '{print $3}')
;;
percent)
echo $(/bin/df | /bin/grep "$1"| /usr/bin/awk '{print $5}' | tr -d "%")
;;
esac