Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Introduction to Amazon CloudWatch


Published on

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

Published in: Technology, Business

Introduction to Amazon CloudWatch

  1. 1. Cloud Watch Henry Huang http:// Amazon CloudWatch
  2. 2. Outline <ul><li>Interface… </li></ul><ul><li>Monitoring… </li></ul><ul><li>Management… </li></ul><ul><li>Q&A… </li></ul>
  3. 3. One example…
  4. 4. CloudWatch
  5. 5. CloudWatch Interfaces <ul><li>AWS Management Console </li></ul><ul><li>CommandLine tools </li></ul><ul><li>Query API (HTTP/HTTPS) </li></ul>Any Python Wrapper? It's Boto. euca2ools
  6. 6. CloudWatch
  7. 7. It can monitor… <ul><li>Amazon EBS </li></ul><ul><li>Amazon EC2 </li></ul><ul><li>Amazon RDS </li></ul><ul><li>Amazon SNS </li></ul><ul><li>Amazon SQS </li></ul><ul><li>Auto Scaling </li></ul><ul><li>Elastic Load Balancing </li></ul>
  8. 8. It can monitor… free every 5 mins SNS topics free every 5 mins SQS queues free every 1 min RDS DB instance free every 5 mins Elastic Load Balancers free every 5 mins EBS volumes additional every 1 min EC2 instance (detail) free every 5 mins EC2 instance (basic) Charge Frequency Monitored AWS resources
  9. 9. CloudWatch
  10. 10. Default Metrics <ul><li>EC2 instance </li></ul><ul><ul><li>CPUUtilization </li></ul></ul><ul><ul><li>DiskReadBytes </li></ul></ul><ul><ul><li>DiskReadOps </li></ul></ul><ul><ul><li>DiskWriteBytes </li></ul></ul><ul><ul><li>DiskWriteOps </li></ul></ul><ul><ul><li>NetworkIn </li></ul></ul><ul><ul><li>NetworkOut </li></ul></ul><ul><li>EBS </li></ul><ul><ul><li>CPUUtilization </li></ul></ul><ul><ul><li>DiskReadBytes </li></ul></ul><ul><ul><li>DiskReadOps </li></ul></ul><ul><ul><li>DiskWriteBytes </li></ul></ul><ul><ul><li>DiskWriteOps </li></ul></ul><ul><ul><li>NetworkIn </li></ul></ul><ul><ul><li>NetworkOut </li></ul></ul>
  11. 11. CloudWatch Concepts <ul><li>Metrics </li></ul><ul><ul><li>Namespaces </li></ul></ul><ul><ul><li>Dimensions </li></ul></ul><ul><ul><li>Timestamps </li></ul></ul><ul><ul><li>Units </li></ul></ul><ul><li>Statistics </li></ul><ul><ul><li>Periods </li></ul></ul><ul><ul><li>Regions </li></ul></ul><ul><li>Alarms* </li></ul>
  12. 12. Metrics <ul><li>Defined by </li></ul><ul><ul><li>Name </li></ul></ul><ul><ul><li>Namespace </li></ul></ul><ul><ul><li>Dimensions </li></ul></ul><ul><ul><li>time stamp </li></ul></ul><ul><ul><li>(optionally) a unit of measure </li></ul></ul><ul><li>Note: </li></ul><ul><ul><li>Data come from any application or business activity from which you collect data, not just Amazon Web Services products and applications. </li></ul></ul>
  13. 13. Metrics on EC2 instance Bytes The number of bytes sent out on all network interfaces by the instance. NetworkOut Bytes The number of bytes received on all network interfaces by the instance. NetworkIn Bytes Bytes written to all ephemeral disks available to the instance. DiskWriteBytes Bytes Bytes read from all ephemeral disks available to the instance DiskReadBytes Count Completed write operations to all ephemeral disks available to the instance. DiskWriteOps Count Completed read operations from all ephemeral disks available to the instance DiskReadOps Percent The percentage of allocated EC2 compute-units CPUUtilization Units Description Metrics Name
  14. 14. Namespaces <ul><li>Conceptual containers for metrics </li></ul><ul><li>Isolated from different namespaces </li></ul><ul><li>Namespace name: </li></ul><ul><ul><li>Valid XML characters: 0-9A-Za-z . - _ / # : </li></ul></ul><ul><ul><li>AWS services: AWS/<service> </li></ul></ul><ul><ul><li>Less than 256 characters in length </li></ul></ul><ul><ul><li>No default namespace, specified each time </li></ul></ul>
  15. 15. Dimensions <ul><li>Categories for metrics’ characteristics </li></ul><ul><li>Name/value pair </li></ul><ul><li>Default metrics </li></ul><ul><ul><li>Can aggregate data across all dimensions </li></ul></ul><ul><li>Up to ten dimensions to a metric </li></ul>
  16. 16. Dimension on EC2 instance all instances running with this specified instance type Instance Type the identified instance only InstanceId all instances running this EC2 AMI ImageId all instances in a specified capacity group. AutoScaling GroupName Description Dimension
  17. 17. Timestamps <ul><li>Each metric data point must be marked with a time stamp </li></ul><ul><li>Valid Ranges: </li></ul><ul><ul><li>up to two weeks in the past </li></ul></ul><ul><ul><li>up to one day in the future </li></ul></ul><ul><li>By default, cloudwatch creates a time stamp based on the time the data was received </li></ul><ul><li>Note: </li></ul><ul><ul><li>Better to provide the time stamp under UTC </li></ul></ul><ul><ul><li>Statistics from CloudWatch, all times reflect the UTC time zone. </li></ul></ul>
  18. 18. Units <ul><li>Statistic's unit of measure </li></ul><ul><li>Common unit: </li></ul><ul><ul><li>Seconds </li></ul></ul><ul><ul><li>Bytes </li></ul></ul><ul><ul><li>Bits </li></ul></ul><ul><ul><li>Percent </li></ul></ul><ul><ul><li>Count </li></ul></ul><ul><ul><li>Bytes/Second (bytes per second) </li></ul></ul><ul><ul><li>Bits/Second (bits per second) </li></ul></ul><ul><ul><li>Count/Second (counts per second) </li></ul></ul><ul><ul><li>None (default when no unit is specified) </li></ul></ul>
  19. 19. Statistics <ul><li>Metric data aggregations over specified periods of time </li></ul>The count (number) of data points used for the statistical calculation. Sample Count The value of Sum/SampleCount during the specified period. Average All values submitted for the matching metric added together. Sum The highest value observed during the specified period. Maximum The lowest value observed during the specified period Minimum Description Statistic
  20. 20. Periods <ul><li>length of time for a specific statistic </li></ul><ul><li>duration </li></ul><ul><ul><li>short as one minute (60 seconds) </li></ul></ul><ul><ul><li>long as two weeks (1,209,600 seconds) </li></ul></ul><ul><li>StartTime & EndTime </li></ul><ul><ul><li>To determine how many periods </li></ul></ul>
  21. 21. Regions <ul><li>Each Amazon Region </li></ul><ul><ul><li>completely isolated from the others </li></ul></ul><ul><li>CloudWatch does not aggregate data across Regions </li></ul><ul><ul><li>Metrics are completely separate between Regions </li></ul></ul>
  22. 22. CloudWatch
  23. 23. Try it now… <ul><li>Create own metrics? </li></ul><ul><li>Setup an Alarm? </li></ul><ul><li>Check the statistics and view graph? </li></ul>
  24. 24. Custom Metrics <ul><li>Generate your data points </li></ul><ul><ul><li>Like: PageViewCount </li></ul></ul><ul><li>Publish your custom metrics </li></ul><ul><ul><li>“ mon-put-data” API </li></ul></ul>Statistics Set Zero Value
  25. 25. Alarms <ul><li>Watches a single metric over a specified time period </li></ul><ul><ul><li>performs one or more actions </li></ul></ul><ul><ul><li>based on the value of the metric to a given threshold over a number of time periods </li></ul></ul><ul><li>Action: </li></ul><ul><ul><li>a notification sent to an SNS topic or Auto Scaling policy </li></ul></ul><ul><li>Invoke actions for sustained state changes only </li></ul><ul><ul><li>Specify the period over which the comparison is made </li></ul></ul><ul><ul><li>Specify how many consecutive periods the threshold must be breached before you are notified </li></ul></ul>
  26. 26. Alarm State <ul><li>OK </li></ul><ul><ul><li>The metric is within the defined threshold </li></ul></ul><ul><li>ALARM </li></ul><ul><ul><li>The metric is outside of the defined threshold </li></ul></ul><ul><li>INSUFFICIENT_DATA </li></ul><ul><ul><li>the metric is not available, alarm started </li></ul></ul><ul><ul><li>not enough data is available for the metric to determine the alarm state </li></ul></ul>
  27. 27. One example…
  28. 28. Features in Alarms <ul><li>Create </li></ul><ul><ul><li>up to 400 alarms per AWS account </li></ul></ul><ul><li>List </li></ul><ul><ul><li>any or all of the currently configured alarms </li></ul></ul><ul><ul><li>list any alarms in a particular state </li></ul></ul><ul><ul><li>filter the list by time range </li></ul></ul><ul><li>Disable/enable </li></ul><ul><li>Test an alarm by setting it to any state </li></ul><ul><ul><li>This temporary state change lasts only until the next alarm comparison occurs </li></ul></ul><ul><li>View an alarm's history </li></ul><ul><ul><li>Cloudwatch preserves alarm history for two weeks </li></ul></ul><ul><ul><li>Each state transition is marked with a unique time stamp </li></ul></ul><ul><ul><li>The time stamp helps to confirm unique state changes </li></ul></ul>
  29. 29. Email Alarm
  30. 30. bird's-eye view <ul><li>Data feed by AWS products </li></ul>
  31. 31. CloudWatch
  32. 32. Pricing <ul><li>Detailed Monitoring for EC2 instances </li></ul><ul><ul><li>at one-minute frequency </li></ul></ul><ul><ul><li>7 pre-defined metrics per instance </li></ul></ul><ul><ul><li>$3.50 per instance per month (=$0.50*7) </li></ul></ul><ul><li>Custom Metrics </li></ul><ul><ul><li>$0.50 per metric per month </li></ul></ul><ul><li>Alarms </li></ul><ul><ul><li>$0.10 per alarm per month </li></ul></ul><ul><li>API Requests </li></ul><ul><ul><li>$0.01 per 1,000 Get, List, or Put requests </li></ul></ul><ul><li>Free Tiers </li></ul><ul><li>Basic Monitoring metrics (at five-minute frequency). </li></ul><ul><li>All customers (each month) </li></ul><ul><ul><li>10 metrics; 10 alarms; 1 million API requests </li></ul></ul>
  33. 33. Have a try… <ul><li>First </li></ul><ul><ul><li>Detailed monitoring on 10 instances </li></ul></ul><ul><ul><li>10 alarms per instance with default 7 metrics </li></ul></ul><ul><ul><li>No API requests in EC2 default metrics </li></ul></ul><ul><li>Second </li></ul><ul><ul><li>Detailed monitoring on 10 instances </li></ul></ul><ul><ul><li>10 alarms per instance with 5 custom metrics </li></ul></ul><ul><ul><li>Custom metrics causes API requests </li></ul></ul>
  34. 34. Q&A