diff --git a/src/im_mad/remotes/common.d/monitor_ds.sh b/src/im_mad/remotes/common.d/monitor_ds.sh index fb1223db72..8253c3956c 100755 --- a/src/im_mad/remotes/common.d/monitor_ds.sh +++ b/src/im_mad/remotes/common.d/monitor_ds.sh @@ -12,6 +12,8 @@ if [ $? == 0 ]; then LVM_SIZE_CMD="sudo vgdisplay --separator : --units m -o vg_size,vg_free --nosuffix --noheadings -C" fi +mkdir -p "$DATASTORE_LOCATION" + USED_MB=$(du -sLm $DATASTORE_LOCATION 2>/dev/null | cut -f1) TOTAL_MB=$(df -B1M -P $DATASTORE_LOCATION 2>/dev/null | tail -n 1 | awk '{print $2}') FREE_MB=$(df -B1M -P $DATASTORE_LOCATION 2>/dev/null | tail -n 1 | awk '{print $4}')