Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Some notes on getting AWS Command line working
- # aws needs the instance date/time to be accurate before communication begins. Further you need to configure the AWS Command line client before you proceed to ensure it has the relevant
- ntpdate uk.pool.ntp.org
- STRT=$(date +%Y-%m-%dT%H:00:00 -d '1 hour ago')
- END=$(date +%Y-%m-%dT%H:00:00)
- #take note of Name Spaces when attempting to access Dimensions.
- APACHECPU
- aws cloudwatch get-metric-statistics --metric-name CPUUtilization --start-time=${STRT} --end-time=${END} --period 3600 --statistics Average --namespace AWS/EC2 --dimensions Name=InstanceId,Value=i-nstanceid
- APACHEIN
- aws cloudwatch get-metric-statistics --metric-name NetworkIn --start-time=${STRT} --end-time=${END} --period 3600 --statistics Sum --namespace AWS/EC2 --dimensions Name=InstanceId,Value=i-nstanceid
- LBREQUESTS
- aws cloudwatch get-metric-statistics --metric-name RequestCount --start-time=${STRT} --end-time=${END} --period 3600 --statistics Sum --namespace AWS/ELB --dimensions Name=LoadBalancerName,Value=lbname
- LB2XX
- aws cloudwatch get-metric-statistics --metric-name HTTPCode_Backend_2XX --start-time=${STRT} --end-time=${END} --period 3600 --statistics Sum --namespace AWS/ELB --dimensions Name=LoadBalancerName,Value=lbname
- LB4XX
- aws cloudwatch get-metric-statistics --metric-name HTTPCode_Backend_4XX --start-time=${STRT} --end-time=${END} --period 3600 --statistics Sum --namespace AWS/ELB --dimensions Name=LoadBalancerName,Value=lbname
- LB5XX
- aws cloudwatch get-metric-statistics --metric-name HTTPCode_Backend_5XX --start-time=${STRT} --end-time=${END} --period 3600 --statistics Sum --namespace AWS/ELB --dimensions Name=LoadBalancerName,Value=lbname
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement