Agnus Dei (jackal) wrote,
Agnus Dei
jackal

How to get VolumeWriteOps in units of Ops/s from AWS CloudWatch from the command line.

# export PERIOD=3600; aws cloudwatch get-metric-statistics --metric-name VolumeWriteOps --start-time `date -d '1 hour ago' "+%Y-%m-%dT%H:%M:%S"` --end-time `date "+%Y-%m-%dT%H:%M:%S"` --period $PERIOD --namespace AWS/EBS --statistics Sum --dimensions Name=VolumeId,Value=vol-XXXXXXXX --region us-east-1 | grep Sum | egrep -o [0-9.]* | awk -v PERIOD=$PERIOD {'print $1/PERIOD'}
340.86
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 0 comments