Amazon RDS: Monitoring
The course is part of this learning path
This introductory course provides a solid foundation in monitoring Amazon RDS using AWS tools.
It begins by getting you acquainted with monitoring databases hosted on the Amazon RDS service and then moves on to explore the available AWS tools that can be used for this purpose.
If you have any feedback relating to this course, please reach out to us at firstname.lastname@example.org.
- Learn about database monitoring in AWS
- How monitoring databases in the cloud is different from on-premises
- Understand the AWS tools available inside RDS for monitoring
- Become aware of the AWS infrastructure monitoring tools that can be used to monitor RDS
This course is intended for anyone who is new to database monitoring — or monitoring in general — and needs to monitor databases hosted in Amazon RDS.
To get the most out of this course, you should have a basic knowledge of cloud computing (Amazon Web Services in particular) and have a high-level understanding of how relational databases work.
Inside Amazon RDS, AWS provides a number of services and related features for monitoring, Amazon CloudWatch along with two of its features, Amazon CloudWatch Logs and Amazon CloudWatch Alarms. Access to the Database log files, Amazon RDS Enhanced Monitoring, Amazon RDS Performance Insights, Amazon RDS Recommendations and Amazon RDS Events.
If someone was to ask you about CPU utilization or disk I/O, one of the first places to look is Amazon CloudWatch. Amazon CloudWatch is AWS' monitoring service. It has a rich feature set that collects metric data from services running inside AWS as well as from systems running on-premises. CloudWatch is more than a simple monitoring service, it collects logs and metrics, it provides visualizations, does alerting and can respond to operational health changes.
CloudWatch is integrated with Amazon RDS and, by default, collects metric data from the hypervisor layer at one-minute intervals. Depending on the instance size and type, it automatically collects between 15 and 18 different metrics. This service is included without additional cost.
CloudWatch has several features that transform passive metric collection into active automated responses. These actions include alarms that can create alerts, send notifications or trigger self-healing automation.
For some hands-on learning with Amazon CloudWatch, Cloud Academy has several labs available including an introductory lab.
One of Amazon CloudWatch's many features is CloudWatch Alarms. CloudWatch Alarms provides alerts when a monitored metric exceeds a pre-defined threshold for a specified amount of time. That's a complicated way of saying that a single data point will not trigger an alarm. The value of the metric must be above the alarm threshold over a period of time. This time component can be configured and prevents spikes or dips from erratically triggering alarms and nearly eliminates the impact of random anomalies. Alarms can trigger actions as well as deliver notifications for when user-intervention is required.
In Amazon RDS, one example of using CloudWatch Alarms is monitoring available storage space on a database instance. Each database engine inside Amazon RDS has its own built-in logging service. These database logs can be viewed, downloaded and monitored using the RDS management console, the AWS Command Line Interface or the Amazon RDS API. Depending on the engine, logs are kept on the database instance for a finite amount of time. If database logs are needed for a longer period of time, they can be sent to CloudWatch Logs for long-term retention.
CloudWatch Logs is a feature of Amazon CloudWatch that provides centralized log collection using durable storage. It is used to monitor, store and access log files from multiple sources including RDS. Inside CloudWatch Logs you can manage log retention policies, query log data for analysis and create metrics for monitoring that have related alarms. Once inside CloudWatch Logs, log files are stored indefinitely by default. Retention policies can be adjusted for individual log groups and can range from one day up to 10 years.
CloudWatch Logs makes it possible to perform real-time analysis of log data. CloudWatch turns log data into actionable metrics that trigger alarms. There is an analysis component in CloudWatch Logs called CloudWatch Logs Insights where log data can be queried in response to operational issues. For more information about CloudWatch Logs and the logging agent, Cloud Academy has courseware available.
While Amazon CloudWatch collects metrics at the hypervisor layer, Enhanced Monitoring uses an agent running on the database instance. The agent sends data in near real-time from the operating system to CloudWatch Logs. Metrics collected from the Enhanced Monitoring agent are useful for seeing how different processes on a database instance use the CPU.
By default, Enhanced Monitoring metrics are stored in CloudWatch Logs for 30 days. However, this retention period can be changed depending on your needs. There's no charge for using Enhanced Monitoring. However, since data is stored in CloudWatch Logs, charges will accrue once the free tier for storage has been exceeded.
Performance Insights expands on existing Amazon RDS monitoring features to illustrate a database's performance, analyze issues and identify bottlenecks. The Performance Insights dashboard provides visualizations of a database's load and can filter by waits, SQL statements, hosts or users.
Amazon RDS Recommendations provides guidance for the optimization of database resources such as instance size and type, read replicas, and the customization of database parameter groups. It provides best practice guidance by analyzing database instance configuration, usage and performance data. Recommendations can be found in the RDS management console. Actions can be performed immediately, scheduled for the next maintenance window or dismissed.
RDS Events are types of changes that fall into certain categories. These are push notifications that happen for events like when an RDS database instance is low on storage or has recovered from a failure. There are more than 40 types of notifications available in the following categories, availability, backup, configuration change, creation, failover, low storage, maintenance, recovery or restoration. Using notifications instead of constantly polling a resource reduces the number of API calls made to the database and simplifies the application architecture.
As a quick recap, RDS has a number of built-in tools for monitoring, management, analysis and reporting. Each of these services and features can be used independently or together to manage and monitor database usage, troubleshoot issues and maintain compliance. These tools include Amazon CloudWatch, RDS Enhanced Monitoring, Database log files and RDS Performance Insights. In a monitoring plan, consider including metrics such as network throughput, input and output operations and client connections. Most of the built-in tools have their costs included in the price of using RDS. However, long term storage of metric data can incur charges.
Stephen is the AWS Certification Specialist at Cloud Academy. His content focuses heavily on topics related to certification on Amazon Web Services technologies. He loves teaching and believes that there are no shortcuts to certification but it is possible to find the right path and course of study.
Stephen has worked in IT for over 25 years in roles ranging from tech support to systems engineering. At one point, he taught computer network technology at a community college in Washington state.
Before coming to Cloud Academy, Stephen worked as a trainer and curriculum developer at AWS and brings a wealth of knowledge and experience in cloud technologies.
In his spare time, Stephen enjoys reading, sudoku, gaming, and modern square dancing.