From 84fe9e443d3f46850b4b5e139c7f72c46f189190 Mon Sep 17 00:00:00 2001 From: Petaris Date: Mon, 6 Jan 2020 16:26:17 -0600 Subject: [PATCH] Update check_disk.sh 1. Update the command to limit to "real" local disks. 2. Update the data so that it is clear that the percentage is used and to include the value of remaining disk space (very useful on large volumes). --- check_disk.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_disk.sh b/check_disk.sh index b68a24e..89da138 100644 --- a/check_disk.sh +++ b/check_disk.sh @@ -43,7 +43,7 @@ j=0; ok=0 warn=0; crit=0 -COMMAND="/bin/df -PH" +COMMAND="/bin/df -PHl -x tmpfs -x devtmpfs" TEMP_FILE="/var/tmp/df.$RANDOM" ## Help funcion @@ -126,7 +126,7 @@ done ## Set the data to show in the nagios service status for (( i=1; i<=$EQP_FS; i++ )); do - DATA[$i]="${FSNAME[$i]} ${PERCENT[$i]}% of ${FULL[$i]}," + DATA[$i]="${FSNAME[$i]} ${PERCENT[$i]}% used of ${FULL[$i]} total - ${FREE[$i]} free," perf[$i]="${FSNAME[$i]}=${PERCENT[$i]}%;${WARN};${CRIT};0;;" done