ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

[AWS DA] AWS Monitoring & Audit: CloudWatch, X-Ray and CloudTrail

2021-06-02 16:02:01  阅读:543  来源: 互联网

标签:Audit Monitoring send AWS CloudWatch EC2 Alarms ray Ray


 

CloudWatch

CloudWath Metrics

  • Default every 5 mins

EC2 Detailed monitoring

  • Get data every 1 mins
  • Free Tier allow to have 10 details monitoring metrics

[Note]: EC2 Memory usage is by default not pushed (if must be pushed, from inside the instance as a csutom metric)

Custom Metrics

  • Possibility to define and send your own custom metrics to CloudWatch
  • Metric resolution:
    • Standard: 1 min
    • High Resolution: up to 1 second
    • StorageResolution API paramter
  • Use API call PutMetricData
  • Use Exponential back off in case of throttle errors

 

CloudWatch Alarms

  • Alarms are used to trigger notifications for any metric
  • Alarms can go to Auto Scaling, EC2 Actions, SNS notifications
  • Alarms States: OK, INSUFFICIENT_DATA, ALARM
  • Period: High Resolution custom metrics: can only choose 10 sec or 30 sec

 

CloudWatch Logs

  • Can define log expiration policies (by default never expire, 30 days ...)
  • Make sure IAM permissions are correct
  • Security, encrypted by KMS at the group level
  • You are able to do search for logs
  • Other actions can do

 

EventBridge

 

X-Ray

Compatibility

  • Lambda
  • Elastic Beanstalk
  • ECS
  • ELB
  • API Gateway
  • EC2 Instances or any applciation server
  • ...

Enable X-Ray

 

 

Enabled X-Ray in ElasticBeanstalk

 

Concepts

  • Segments: each application / service will send the them
  • Subsegments: if you need more details in your segment
  • Trace: segments collected together to form an end-to-end trace
  • Sampling: decrease the amount of requests send to X-Ray, reduce costs
  • Annotations: Key Value pairs, used to index / search traces and use with filter
  • Metadata: Key Value paris, not indexed, not used for searching

 

  • PutTraceSegements: most important one, enable x-ray send data to server
  • PutTelemetryRecords
  • GetSamplingRules: also write to x-ray
  • GetSamplingStaticSummaries
  • GetSamplingTargets

 

There are two ways to run X-Ray on ECS instances.

1. Well-known one is deploy X-Ray daemon on an own docker container pre EC2 instance

2. "Side Car", deploy X-Ray daemon container along side Application container, each app with one x-ray daemon.

3. For Fargate, use side car approach

On ECS, main thing to remember for Exam is that

  • You need to map x-ray port: 2000
  • and protocal: udp

 

标签:Audit,Monitoring,send,AWS,CloudWatch,EC2,Alarms,ray,Ray
来源: https://www.cnblogs.com/Answer1215/p/14839578.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有