Understanding Monitoring and Alerting Services in AWS

  Amazon Web Services (AWS), CloudWatch

Main Menu

Section Menu

Understanding Monitoring and Alerting Services in AWS

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082768?start=0

What is Monitoring

  • Monitoring gives the administraotrs continuous inside view of the health and performance of the services being monitored.
  • Monitoring keeps track of the services performance and historic monitoring data
  • Monitoring alone is insufficient since it relies on historical data and therefor requires system alerts

What is Alerting

  • A system for notifying admins about any issues with the services so they can be rectified
  • Some alerts can be pre-programed to take actions, such as automatically spinning up a new EC2 instance if one goes down.

Systems for Monitoring and Alerting in AWS

  • Cloudwatch
    • Defacto monitoring services on AWS
      • EC2
      • ELB
      • EBS, RDS, etc
    • Can be used to:
      • Collect and track Metrics
      • Collect and monitor Log Files
      • Set Alarms
      • Automatically react to changes in your AWS resources.
        • CPU consumption
        • Memory Utilization
        • Read/Write Disk Speed
        • Custom metrics we define
  • SNS (Simple Notification Service) & SES (Simple Email Service)
    • Used for alerting

 

AWS Monitoring Overview

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082770?start=0

Cloudwatch

  • Services > Management Tools > CloudWatch
  • Access and interaction with CloudWatch is available via
    • Gui
    • AWS CLI
    • APIs with the use of AWS SDKs

SNS Simple Notification Service

  • Services > Application Integration > SNS
  • Fully managed push messaging service allowing users to push Text notifications

SES Simple Email Service

  • Services > Customer Engagement > SES

What can be monitored on AWS

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082772?start=0

What can be monitored?

  • Infrastucture and Resource Health
    • CPU (Essential!)
      • High usage means you’ll ‘starve’ your applications
      • Causes of high cpu
        • Poorly written/optimized code
        • High usage
        • Malicious users/attacks
  • Billing and Charges
    • Too easy to deploy resources
    • Can be caught off-guard quickly
      • forget to turn off unused resources
      • poor coding / auto deployment
    • Can be alerted when monthly bill exceeds specific amounts
  • Custom Metrics
    • Define your own, such as function timers
  • Logs
    • Rate of errors exceeds specified threshold
      • Null-reference exception
      • 404 reference codes…

AWS Metrics

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082774?start=0

Billing

  • CloudWatch > Alarms > Billing

Resource Health

  • CloudWatch > Metrics
  • All resources that are monitored will be displayed here.
  • Each AWS service has its own set of metrics

What is AWS CloudWatch

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082776?start=0

Review: What is AWS CloudWatch

  • A monitoring services for AWS resources
  • It can collect and track metrics from various AWS resources
    • These include log files and custom applications
  • Can create alarms on any metrics monitored
    • via SNS or Email
    • Alarms can also trigger automated actions
      • Launch a custom script
      • Call an API
      • These are great when automated proactivity is required

Introduction to AWS CloudWatch

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082778?start=0

Overview of creating alarms.

Monitoring Metrics via AWS CloudWatch

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082780?start=0

Things you can do with CloudWatch

Visualize your CloudWatch Metrics

  • Multiple Metrics can be plotted on a single graph
  • Graphs are updated in real time

Monitor Resource Changes

  • As resources are added, can send alerts or take action

Monitor Custom events or metrics

  • Not bound by AWS metrics alone
    • Number of times a failed login occurs
  • Alarms can be triggered based on these metrics

Introduction to AWS SNS

https://www.udemy.com/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns/learn/v4/t/lecture/7082782?start=0

What is AWS SNS

  • A fast, flexible and fully managed push notification service
  • Lets you send
    • individual messages
    • fan-out messages to a large number of recipients
  • Easy to send push notifications to:
    • Mobile devices
    • users
    • Email
    • Other services & Various endpoints
      • SQS (Simple Queue Service)
      • Lamda functions
      • Any HTTP Endpoint
  • Is a “Pub-Sub” (Publish – Subscriber) based messaging service
    • Can issue a notification to a topic and all endpoints that subscribe to that topic will receive the message

Creating an SNS Topic

  • Services > Application Integration > SNS > Create Topic
    • Name: No spaces
    • Display Name: Spaces, only 10 characters – Lame!
  • Any message delivered to this topic will automatically be delivered to the subscribers
  • [ Create Subscription ]
    • Topic ARN: Auto populated
    • Protocol
      • HTTP, HTTPS
        • Good to invoke an API that can take action
          • Spin up EC2, DNS, etc
      • Email
        • Endpoint: Email address to deliver to
        • Should probably be a distribution list
      • Email-JSON
      • Amazon SQS
        • Message gets queued. Other applications monitor this queue
      • Application
      • AWS Lamda
        • Custom actions based on the message
      • SMS
    • Subscriptions must be confirmed (recipient must confirm they intend to receive these messages to prevent abuse (spam)
      • after subcription is confirmed, a subcription ID is applied.

Create the alarm

  • CloudWatch > Alarms
    • Name, description
    • Threshold parameters
    • Actions
      • Whenever this alarm is: ….
      • Send notification to: Select SNS topic
    • [Create Alarm]
  • Until enough data has been collected ,the alarm state will be “INSUFFICIENT_DATA”

Deleting Alarms

  • Will NOT delete
    • notifications
    • subscriptions
    • topics
    • any metric the alarm used
  • Just deletes the alarm.

QUIZ

Is it true that  in today’s Agility driven applications backed by cloud computing, monitoring alone is sufficient.

  • True
  • False
    • It is not sufficient, but is very crucial. Monitoring gives hte administor continuous inside view o the health of the services being monitored. It also keeps track of hte service performance and historic data that can be later churned to produce insights on the application availability

How many services are responsible for monitoring and alerting within AWS ecosystem?

  • One
  • Multiple services
    • CloudWatch
    • SNS
    • and others! (not listed 🙁 )
  • None
  • All Service

AWS CloudWatch is the de-facto monitoring services on AWS which monitors key metrics of services like:

  • EC2 and EBS
  • ELB and EBS
  • EC2 and ELB
  • All of the above

__________ is a monitoring service fo AWS cloud resources and the applications you run on AWS

  • CloudWatch
  • Elastic Load Balancer
  • Elastic Block Store
  • EC2

 

LEAVE A COMMENT