Skip to content

Commit

Permalink
Merge pull request #30 from level23/seconds-var-fix
Browse files Browse the repository at this point in the history
Seconds var fix
  • Loading branch information
teyeheimans authored May 17, 2018
2 parents 11bb65a + 75aa63a commit 85e290d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions check_cloudwatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ NAMESPACE_PREFIX="AWS"
MINUTES=0
START_TIME=""
END_TIME=""
SECONDS=0
SECS=0
REGION=""
METRIC=""
STATISTICS="Average"
Expand Down Expand Up @@ -385,7 +385,7 @@ case ${i} in
fi

END_TIME=$(date -u +'%Y-%m-%dT%H:%M:00')
SECONDS=$((60 * ${MINUTES}));
SECS=$((60 * ${MINUTES}));
shift ;
;;

Expand Down Expand Up @@ -508,7 +508,7 @@ verbose "Start time: ${START_TIME}";
verbose "Metric name: ${METRIC}";
verbose "Stop time: ${END_TIME}";
verbose "Minutes window: ${MINUTES}";
verbose "Period (Seconds): ${SECONDS}";
verbose "Period (Seconds): ${SECS}";
verbose "Dimensions: ${DIMENSIONS}";

COMMAND="aws cloudwatch get-metric-statistics"
Expand All @@ -518,7 +518,7 @@ COMMAND="${COMMAND} --metric-name ${METRIC}";
COMMAND="${COMMAND} --output json";
COMMAND="${COMMAND} --start-time ${START_TIME}";
COMMAND="${COMMAND} --end-time ${END_TIME}";
COMMAND="${COMMAND} --period ${SECONDS}";
COMMAND="${COMMAND} --period ${SECS}";
COMMAND="${COMMAND} --statistics ${STATISTICS}";
COMMAND="${COMMAND} --dimensions ${DIMENSIONS}";

Expand Down

0 comments on commit 85e290d

Please sign in to comment.