Top 28 Aws Cloudwatch Interview Questions You Must Prepare 27.Jul.2024

Q1. Can I Access The Metrics Data For A Terminated Ec2 Instance Or A Deleted Elb?

Yes, CloudWatch stores metrics for terminated EC2 instances or deleted ELBs for 15 months.

Q2. What Platforms Does The Cloudwatch Logs Agent Support?

The CloudWatch Log Agent is supported on Amazon Linux, Ubuntu, CentOS, Red Hat Enterprise Linux, and Windows. This agent will support the ability to monitor individual log files on the host.

Q3. What Metrics Are Available At High Resolution?

Currently, only customer metrics that you publish to CloudWatch are available at high resolution.

Q4. What Is Amazon Cloudwatch?

CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS. You can use CloudWatch to collect and track metrics, collect and monitor log files, and set alarms. CloudWatch can monitor resources such as EC2 instances, DynamoDB tables, and RDS DB instances.

Q5. Which Operating Systems Does Cloudwatch Support?

CloudWatch receives and provides metrics for all EC2 instances and should work with any operating system currently supported by the EC2 service.

Q6. Does The Amazon Cloudwatch Monitoring Charge Change Depending On Which Ec2 Instance I Monitor?

No, CloudWatch monitoring charge does not vary by EC2 instance type.

Q7. What Statistics Can I View And Graph In Cloudwatch?

You can retrieve, graph, and set alarms on the following statistical metrics: average, sum, min, max, and sample count.

Q8. What Thresholds Can I Set To Trigger A Cloudwatch Alarm?

When you create an alarm, you first choose the CloudWatch metric you want it to monitor. Next, you choose the evaluation period and a statistical value to measure. To set a threshold, set a target value and choose whether the alarm will trigger when the value is greater, equal, or less than that value.

Q9. What Types Of Data Can I Send To Cloudwatch Logs From My Ec2 Instances Running Sql Server And Windows Server?

You can configure the EC2Config service to send a variety of data and log files to CloudWatch including: custom text logs, Even logs, Event Tracing logs, and Performance Counter data.

Q10. What Is Amazon Cloudwatch Logs?

Amazon CloudWatch Logs lets you monitor and troubleshoot your systems and applications using your existing system, application and custom log files. With CloudWatch Logs, you can monitor your logs, in near real time, for specific phrases, values or patterns. For example, you could set an alarm on the number of errors that occur in your system logs or view graphs of latency of web requests from your application logs. You can then view the original log data to see the source of the problem. Log data can be stored and accessed indefinitely in highly durable, low-cost storage so you don't have to worry about filling up hard drives.

Q11. What If I Configure The Cloudwatch Logs Agent To Send Non-text Log Data?

The CloudWatch Logs Agent will record an error in the event it has been configured to report non-text log data.

Q12. When Would I Use A Custom Metric Over Having My Program Emit A Log To Cloudwatch Logs?

You can monitor your own data using custom metrics, CloudWatch logs, or both. You may want to use custom metrics if your data is not already produced in log format, for example OS process or performance measurements. Or, you may want to write your own application or script, or one provided by an AWS partner. If you want to store and save individual measurements along with additional detail, you may want to use CloudWatch Logs.

Q13. What Is The Retention Period Of All Metrics?

CloudWatch retains metric data as follows:

  1. Data points with a period of less than 60 seconds are available for 3 hours. These data points are high-resolution custom metrics,
  2. Data points with a period of 60 seconds (1 minute) are available for 15 days,
  3.  Data points with a period of 300 seconds (5 minute) are available for 63 days, 4) Data points with a metric of 3600 seconds (1 hr) are available for 455 days (15 months). Data points that are initially published with a shorter period are aggregated together for long-term storage.

Q14. Does The Cloudwatch Logs Agent Support Iam Roles?

Yes. The CloudWatch Logs Agent is integrated with IAM and includes support for both access keys and IAM roles.

Q15. What Is The Syntax Of Metric Filter Patterns?

A Metric Filter pattern can contain search terms or a specification of your common log or JSON event format. CloudWatch Logs can also be used to extract values from a log even in common log or JSON format.

Q16. What Can I Measure With Amazon Cloudwatch Metrics?

CloudWatch allows you to monitor AWS cloud resources and the applications you run on AWS. Metrics are provided automatically for a number of AWS products and services, including EC2 instances, EBS volumes, ELBs, Autoscaling groups, EMR job flows, RDS DB instances, DynamoDB tables, ElastiCache clusters, RedShift clusters, OpsWorks stacks, Route 53 health checks, SNS topics, SQS queues, SWF workflows, and Storage Gateways. You can also monitor custom metrics generated by your own applications and services.

Q17. What Actions Can I Take From A Cloudwatch Alarm?

When you create an alarm, you can configure it to perform one or more automated actions when the metric you chose to monitor exceeds a threshold you define.

Ex: send an email, publish to SQS, stop/terminate an EC2 instance, or execute an auto-scaling policy.

Q18. Will I Lose The Metrics Data If I Disable Monitoring For An Ec2 Instance?

No. You can always retrieve metrics data for any EC2 instance based on the retention schedules. However, the CloudWatch console limits the search of metrics to 2 weeks after a metric is last ingested to ensure that the most up to date instances are shown in your namespace.

Q19. What Types Of Cloudwatch Alarms Can Be Created?

You can create an alarm to monitor any CloudWatch metric in your account. You can also create an alarm on custom metrics that are specific to your custom application or infrastructure.

Q20. What Kinds Of Things Can I Do With Cloudwatch Logs?

CloudWatch Logs is capable of monitoring and storing your logs to help you better understand and operate your systems and applications.

You can use CloudWatch logs in a number of ways:

  1. Real Time application and system monitoring,
  2. Long term log retention.

Q21. How Long Does Cloudwatch Logs Store My Data?

You can store your log data for as long as you want. By default, CloudWatch Logs will store your log data indefinitely. You can change the retention for each LogGroup at any time.

Q22. Are High-resolution Custom Metrics Priced Differently Than Regular Custom Metrics?

No, high-resolution custom metrics are priced in the same manner as standard 1-min custom metrics.

Q23. How Do I Retrieve My Log Data?

You can retrieve any of your log data using the CloudWatch Logs console or through the CloudWatch Logs CLI. Log events are retrieved based on the Log Group, Log Stream and time with which they are associated.

Q24. What Kinds Of Things Can I Do With My Logs In Cloudwatch?

CloudWatch Logs is capable of monitoring and storing your logs to help you better understand and operate your systems and applications. When you use CloudWatch Logs with your logs, your existing log data is used for monitoring, so no code changes are required.

Q25. What Log Monitoring Does Cloudwatch Provide?

CloudWatch Logs lets you monitor and troubleshoot your systems and applications using your existing system, application and custom log files. With CloudWatch Logs, you can monitor your logs, in near real time, for specific phrases, values or patterns.

Q26. Can I Use Regular Expressions With My Log Data?

CloudWatch Metric Filters does not support regular expressions. To process your log data with regular expressions, consider using Amazon Kinesis and connect the stream with a regular expression processing engine.

Q27. How Frequently Does The Cloudwatch Logs Agent Send Data?

The CloudWatch Logs Agent will send log data files every five seconds by default and is configurable by the user.

Q28. What Access Management Policies Can I Implement For Cloudwatch?

CloudWatch integrates with AWS IAM so that you can specify which CloudWatch actions a user in your AWS Account can perform. You can't use IAM to control access to CloudWatch data for specific resources. For example, you can't give a user access to CloudWatch data for only a specific set of instances or a specific LoadBalancer. Permissions granted using IAM cover all the cloud resources you use with CloudWatch. In addition, you can't use IAM roles with the Amazon CloudWatch command line tools.