From 82e72192c73cfc31014efbf0b6194de947ffd788 Mon Sep 17 00:00:00 2001 From: Teye Heimans Date: Mon, 16 Jul 2018 16:59:16 +0200 Subject: [PATCH] Fixed $DIMENSIONS parameter being optional --- check_cloudwatch.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_cloudwatch.sh b/check_cloudwatch.sh index 216b2e1..8e7ec6c 100755 --- a/check_cloudwatch.sh +++ b/check_cloudwatch.sh @@ -520,7 +520,11 @@ COMMAND="${COMMAND} --start-time ${START_TIME}"; COMMAND="${COMMAND} --end-time ${END_TIME}"; COMMAND="${COMMAND} --period ${SECS}"; COMMAND="${COMMAND} --statistics ${STATISTICS}"; -${DIMENSIONS} && COMMAND="${COMMAND} --dimensions ${DIMENSIONS}"; + +if [[ "${DIMENSIONS}" != "" ]]; +then + COMMAND="${COMMAND} --dimensions ${DIMENSIONS}"; +fi if [[ "${PROFILE}" != "" ]]; then