introduction to amazon cloudwatch

34
Cloud Watch Henry Huang http:// aws.silentreader.net Amazon CloudWatch

Upload: henry-huang

Post on 22-Jun-2015

10.495 views

Category:

Technology


76 download

DESCRIPTION

Introduction to Amazon CloudWatch Service. It discussed multiple interfaces of CloudWatch Service, the custom way of monitoring, and easy management.

TRANSCRIPT

Page 1: Introduction to Amazon CloudWatch

Cloud Watch

Henry Huanghttp://aws.silentreader.net

Amazon CloudWatch

Page 2: Introduction to Amazon CloudWatch

Outline

• Interface…• Monitoring…• Management…• Q&A…

Page 3: Introduction to Amazon CloudWatch

One example…

Page 4: Introduction to Amazon CloudWatch

CloudWatch

Page 5: Introduction to Amazon CloudWatch

CloudWatch Interfaces

• AWS Management Console • CommandLine tools• Query API (HTTP/HTTPS)

Page 6: Introduction to Amazon CloudWatch

CloudWatch

Page 7: Introduction to Amazon CloudWatch

It can monitor…

• Amazon EBS• Amazon EC2• Amazon RDS• Amazon SNS• Amazon SQS• Auto Scaling• Elastic Load Balancing

Page 8: Introduction to Amazon CloudWatch

It can monitor…Monitored AWS resources Frequency Charge

EC2 instance (basic) every 5 mins free

EC2 instance (detail) every 1 min additional

EBS volumes every 5 mins free

Elastic Load Balancers every 5 mins free

RDS DB instance every 1 min free

SQS queues every 5 mins free

SNS topics every 5 mins free

Page 9: Introduction to Amazon CloudWatch

CloudWatch

Page 10: Introduction to Amazon CloudWatch

Default Metrics

• EC2 instance– CPUUtilization– DiskReadBytes– DiskReadOps– DiskWriteBytes– DiskWriteOps– NetworkIn– NetworkOut

• EBS– CPUUtilization– DiskReadBytes– DiskReadOps– DiskWriteBytes– DiskWriteOps– NetworkIn– NetworkOut

Page 11: Introduction to Amazon CloudWatch

CloudWatch Concepts• Metrics

– Namespaces– Dimensions– Timestamps– Units

• Statistics– Periods– Regions

• Alarms*

Page 12: Introduction to Amazon CloudWatch

Metrics

• Defined by– Name– Namespace– Dimensions– time stamp– (optionally) a unit of measure

• Note:– Data come from any application or business activity from

which you collect data, not just Amazon Web Services products and applications.

Page 13: Introduction to Amazon CloudWatch

Metrics on EC2 instance

Metrics Name Description Units

CPUUtilization The percentage of allocated EC2 compute-units Percent

DiskReadOps Completed read operations from all ephemeral disks available to the instance

Count

DiskWriteOps Completed write operations to all ephemeral disks available to the instance.

Count

DiskReadBytes Bytes read from all ephemeral disks available to the instance Bytes

DiskWriteBytes Bytes written to all ephemeral disks available to the instance. Bytes

NetworkIn The number of bytes received on all network interfaces by the instance.

Bytes

NetworkOut The number of bytes sent out on all network interfaces by the instance.

Bytes

Page 14: Introduction to Amazon CloudWatch

Namespaces

• Conceptual containers for metrics• Isolated from different namespaces• Namespace name:

– Valid XML characters: 0-9A-Za-z . - _ / # :– AWS services: AWS/<service>– Less than 256 characters in length– No default namespace, specified each time

Page 15: Introduction to Amazon CloudWatch

Dimensions

• Categories for metrics’ characteristics• Name/value pair• Default metrics

– Can aggregate data across all dimensions

• Up to ten dimensions to a metric

Page 16: Introduction to Amazon CloudWatch

Dimension on EC2 instance

Dimension Description

AutoScalingGroupName all instances in a specified capacity group.

ImageId all instances running this EC2 AMI

InstanceId the identified instance only

InstanceType all instances running with this specified instance type

Page 17: Introduction to Amazon CloudWatch

Timestamps• Each metric data point must be marked with a time

stamp• Valid Ranges:

– up to two weeks in the past – up to one day in the future

• By default, cloudwatch creates a time stamp based on the time the data was received

• Note:– Better to provide the time stamp under UTC– Statistics from CloudWatch, all times reflect the UTC time

zone.

Page 18: Introduction to Amazon CloudWatch

Units• Statistic's unit of measure• Common unit:

– Seconds– Bytes– Bits– Percent– Count– Bytes/Second (bytes per second)– Bits/Second (bits per second)– Count/Second (counts per second)– None (default when no unit is specified)

Page 19: Introduction to Amazon CloudWatch

Statistics

• Metric data aggregations over specified periods of time

Statistic Description

Minimum The lowest value observed during the specified period

Maximum The highest value observed during the specified period.

Sum All values submitted for the matching metric added together.

Average The value of Sum/SampleCount during the specified period.

SampleCount

The count (number) of data points used for the statistical calculation.

Page 20: Introduction to Amazon CloudWatch

Periods

• length of time for a specific statistic • duration

– short as one minute (60 seconds)– long as two weeks (1,209,600 seconds)

• StartTime & EndTime– To determine how many periods

Page 21: Introduction to Amazon CloudWatch

Regions

• Each Amazon Region– completely isolated from the others

• CloudWatch does not aggregate data across Regions– Metrics are completely separate between Regions

Page 22: Introduction to Amazon CloudWatch

CloudWatch

Page 23: Introduction to Amazon CloudWatch

Try it now…

• Create own metrics?• Setup an Alarm?• Check the statistics and view graph?

Page 24: Introduction to Amazon CloudWatch

Custom Metrics

• Generate your data points– Like: PageViewCount

• Publish your custom metrics– “mon-put-data” API

Statistics Set

Zero

Value

Page 25: Introduction to Amazon CloudWatch

Alarms

• Watches a single metric over a specified time period– performs one or more actions – based on the value of the metric to a given threshold over

a number of time periods

• Action: – a notification sent to an SNS topic or Auto Scaling policy

• Invoke actions for sustained state changes only– Specify the period over which the comparison is made– Specify how many consecutive periods the threshold must

be breached before you are notified

Page 26: Introduction to Amazon CloudWatch

Alarm State

• OK– The metric is within the defined threshold

• ALARM– The metric is outside of the defined threshold

• INSUFFICIENT_DATA– the metric is not available, alarm started– not enough data is available for the metric to

determine the alarm state

Page 27: Introduction to Amazon CloudWatch

One example…

Page 28: Introduction to Amazon CloudWatch

Features in Alarms• Create

– up to 400 alarms per AWS account• List

– any or all of the currently configured alarms– list any alarms in a particular state– filter the list by time range

• Disable/enable• Test an alarm by setting it to any state

– This temporary state change lasts only until the next alarm comparison occurs

• View an alarm's history– Cloudwatch preserves alarm history for two weeks– Each state transition is marked with a unique time stamp– The time stamp helps to confirm unique state changes

Page 29: Introduction to Amazon CloudWatch

Email Alarm

Page 30: Introduction to Amazon CloudWatch

bird's-eye viewData feed by AWS products

Page 31: Introduction to Amazon CloudWatch

CloudWatch

Page 32: Introduction to Amazon CloudWatch

Pricing• Detailed Monitoring for EC2 instances

– at one-minute frequency– 7 pre-defined metrics per instance– $3.50 per instance per month (=$0.50*7)

• Custom Metrics– $0.50 per metric per month

• Alarms– $0.10 per alarm per month

• API Requests– $0.01 per 1,000 Get, List, or Put requests

Free Tiers• Basic Monitoring metrics (at five-minute frequency). • All customers (each month)

– 10 metrics; 10 alarms; 1 million API requests

Page 33: Introduction to Amazon CloudWatch

Have a try…

• First– Detailed monitoring on 10 instances– 10 alarms per instance with default 7 metrics– No API requests in EC2 default metrics

• Second– Detailed monitoring on 10 instances– 10 alarms per instance with 5 custom metrics– Custom metrics causes API requests

Page 34: Introduction to Amazon CloudWatch

Q&A