2.9 Amazon EC2 Monitoring

AWS provides various tools that you can use to monitor Amazon EC2. 

Automated monitoring tools

  • System status checks – monitor the AWS systems required to use your instance to ensure that they are working properly
  • Instance status checks – monitor the software and network configuration of your individual instance.
  • Amazon CloudWatch alarms– watch a single metric over a time period you specify, and perform one or more actions based on the value of the metric relative to a given threshold over a number of time periods
  • Amazon EventBridge – automate your AWS services and respond automatically to system events. Events from AWS services are delivered to EventBridge in near real time, and you can specify automated actions to take when an event matches a rule you write.
  • Amazon CloudWatch Logs – monitor, store, and access your log files from Amazon EC2 instances, AWS CloudTrail, or other sources.
  • CloudWatch agent – collect logs and system-level metrics from both hosts and guests on your EC2 instances and on-premises servers. 
  • AWS Management Pack for Microsoft System Center Operations Manager 

Manual monitoring tools

  • Amazon EC2 Dashboard
  • Amazon CloudWatch Dashboard

Best practices for monitoring

  • Make monitoring a priority to head off small problems before they become big ones.
  • Create and implement a monitoring plan that collects monitoring data from all of the parts in your AWS solution so that you can more easily debug a multi-point failure if one occurs.
  • Automate monitoring tasks as much as possible.
  • Check the log files on your EC2 instances.

Status checks

  •  Amazon EC2 performs automated checks on every running EC2 instance to identify hardware and software issues
  • Status checks are performed every minute, returning a pass or a fail status.
  • Status checks are built into Amazon EC2, so they cannot be disabled or deleted.

System status checks

  • These checks detect underlying problems with your instance that require AWS involvement to repair
  • The following are examples of problems that can cause system status checks to fail:
    • Loss of network connectivity
    • Loss of system power
    • Software issues on the physical host
    • Hardware issues on the physical host that impact network reachability

Instance status checks

  • Amazon EC2 checks the health of the instance by sending an address resolution protocol (ARP) request to the network interface (NIC).
  • These checks detect problems that require your involvement to repair.
  • The following are examples of problems that can cause instance status checks to fail:
    • Failed system status checks
    • Incorrect networking or startup configuration
    • Exhausted memory
    • Corrupted file system
    • Incompatible kernel

CloudWatch

  • You can monitor your instances using Amazon CloudWatch, which collects and processes raw data from Amazon EC2 into readable, near real-time metrics.
  • These statistics are recorded for a period of 15 months
  • By default, Amazon EC2 sends metric data to CloudWatch in 5-minute periods. To send metric data for your instance to CloudWatch in 1-minute periods, you can enable detailed monitoring on the instance. 
  • You can use Amazon CloudWatch to collect metrics and logs from the operating systems for your EC2 instances.

Automate Amazon EC2 with EventBridge

  • Amazon EventBridge enables you to automate your AWS services and respond automatically to system events such as application availability issues or resource changes.
  • Events from AWS services are delivered to EventBridge in near real time.
  • You can write simple rules to indicate which events are of interest to you, and the automated actions to take when an event matches a rule.
  • The actions that can be automatically triggered include the following:
    • Invoking an AWS Lambda function
    • Invoking Amazon EC2 Run Command
    • Relaying the event to Amazon Kinesis Data Streams
    • Activating an AWS Step Functions state machine
    • Notifying an Amazon SNS topic or an Amazon SQS queue

 AWS CloudTrail

  • AWS CloudTrail is a service that provides a record of actions taken by a user, role, or an AWS service in Amazon EC2 and Amazon EBS.
  •  The trail logs events from all Regions in the AWS partition and delivers the log files to the Amazon S3 bucket that you specify.
  • Every event or log entry contains information about who generated the request.

Reference

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring_ec2.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值