{"id":1590,"date":"2018-09-10T23:05:20","date_gmt":"2018-09-10T23:05:20","guid":{"rendered":"http:\/\/wiki.thomasandsofia.com\/?p=1590"},"modified":"2018-09-24T11:02:31","modified_gmt":"2018-09-24T11:02:31","slug":"monitoring-and-alerting-for-aws-rds","status":"publish","type":"post","link":"https:\/\/wiki.thomasandsofia.com\/?p=1590","title":{"rendered":"Monitoring and Alerting for AWS RDS"},"content":{"rendered":"<p>Main Menu<\/p>\n<p>Section Menu<\/p>\n<ul>\n<li><a href=\"#IntroductiontomonitoringandalertingforAWSRDS\">Introduction to monitoring and alerting for AWS RDS<\/a><\/li>\n<li><a href=\"#MonitoringAWSRDSmetrics\">Monitoring AWS RDS metrics<\/a><\/li>\n<li><a href=\"#AWSRESevents\">AWS RES events<\/a><\/li>\n<li><a href=\"#Quiz\">Quiz<\/a><\/li>\n<\/ul>\n<p><a name=\"IntroductiontomonitoringandalertingforAWSRDS\"><\/a><\/p>\n<h1>Introduction to monitoring and alerting for AWS RDS<\/h1>\n<p><a href=\"https:\/\/www.udemy.com\/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns\/learn\/v4\/t\/lecture\/7082820?start=0\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns\/learn\/v4\/t\/lecture\/7082820?start=0<\/a><\/p>\n<h2>Overview<\/h2>\n<ul>\n<li>Intro to RDS<\/li>\n<li>Key Metric available<\/li>\n<li>Monitoring for availability and performance<\/li>\n<\/ul>\n<h2>AWS RDS<\/h2>\n<ul>\n<li>Relational Database Service<\/li>\n<li>Provides a scalable database service<\/li>\n<li>PaaS &#8211; Platform as a service<\/li>\n<li>Multiple Database engines supported\n<ul>\n<li>MySQL<\/li>\n<li>PostGre<\/li>\n<li>MSSQL<\/li>\n<li>Oracle<\/li>\n<li>MySQL Clone called Aurora<\/li>\n<\/ul>\n<\/li>\n<li>Highly scalable for large data loads<\/li>\n<li>Can be configured with High Availability mode\n<ul>\n<li>Automatically fails over to a healthy replica<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Monitoring AWS RDS<\/h2>\n<ul>\n<li>Proper monitoring and alerting is essential<\/li>\n<li>RDS and CloudWatch provide various monitoring options\n<ul>\n<li>Provided Metrics<\/li>\n<li>Alarms<\/li>\n<li>Logs<\/li>\n<li>Events<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Demo &#8211; Overview of RDS Monitoring<\/h2>\n<ul>\n<li>Events\n<ul>\n<li>Events related to the database instance\n<ul>\n<li>Includes the time and date of the event<\/li>\n<li>Source name and source type<\/li>\n<li>Message associated with the event<\/li>\n<li>Can be configured to send notifications<\/li>\n<\/ul>\n<\/li>\n<li>Database<\/li>\n<li>DB Snapshots<\/li>\n<li>DB Security Group changes<\/li>\n<li>Parameter Groups<\/li>\n<\/ul>\n<\/li>\n<li>Event Suscriptions allow you to define the type\/method of sending alerts.<\/li>\n<li>Logs:RDS &gt; Instances &gt; Select instance &gt; Scroll way down to Logs\n<ul>\n<li>Available logs depend on the type of DB engine you are using.\n<ul>\n<li>MySQL\n<ul>\n<li>Error Log<\/li>\n<li>Slow Query Log<\/li>\n<li>General Log<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Logs are updated every 5 seconds<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a name=\"MonitoringAWSRDSmetrics\"><\/a><\/p>\n<h1>Monitoring AWS RDS metrics<\/h1>\n<p><a href=\"https:\/\/www.udemy.com\/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns\/learn\/v4\/t\/lecture\/7082822?start=0\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns\/learn\/v4\/t\/lecture\/7082822?start=0<\/a><\/p>\n<h2>Key Metrics<\/h2>\n<ul>\n<li>CPU Utilization: % of CPU utilized<\/li>\n<li>*Database Connections: Number of connections currently in use by all the clients of the database.<\/li>\n<li>Freeable Memory: Ram Available (MB)<\/li>\n<li>*Free Storage Space: Storage Space Available (MB)<\/li>\n<li>Read IOPs \/ Write IOPs\n<ul>\n<li>High IOPs may suggest volume backing the database may get overloaded\n<ul>\n<li>This can cause slower responses<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>*Read Latency \/ Write Latency: Track the average time taken per disk input, output or IO operation.\n<ul>\n<li>High latency values are a cause of concern because it is an indicator that:\n<ul>\n<li>disk activity is overloaded<\/li>\n<li>performance is degraded<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>* These are the most important when it comes to production monitoring!<\/p>\n<h2>Demo: RDS Metrics<\/h2>\n<ul>\n<li>RDS &gt; Instances &gt; Select Database Instance\n<ul>\n<li>Demo is old and does not match current AWS display \ud83d\ude41<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Create Alarm<\/h2>\n<ul>\n<li>RDS &gt; Instances &gt; Select Database Instance &gt; Scroll down to &#8220;CloudWatch Alarms&#8221; &gt; [Create Alarm]<\/li>\n<li>Typical alarm setup\n<ul>\n<li>Where to send the notification<\/li>\n<li>Metric to monitor<\/li>\n<li>Thresholds<\/li>\n<li>Alarm name<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><a name=\"AWSRESevents\"><\/a><\/p>\n<h1>AWS RDS events<\/h1>\n<p><a href=\"https:\/\/www.udemy.com\/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns\/learn\/v4\/t\/lecture\/7082824?start=0\" target=\"_blank\" rel=\"noopener\">https:\/\/www.udemy.com\/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns\/learn\/v4\/t\/lecture\/7082824?start=0<\/a><\/p>\n<h2>Key metrics should be monitored closely<\/h2>\n<ul>\n<li>Resource Utilization<\/li>\n<li>System errors<\/li>\n<li>Accidental termination<\/li>\n<li>Cluster health<\/li>\n<li>Maintenance windows<\/li>\n<li>Query logs<\/li>\n<li>RDS metrics<\/li>\n<li>Instance level metrics<\/li>\n<li>RDS resource modification<\/li>\n<\/ul>\n<h2>RDS Events<\/h2>\n<ul>\n<li>RDS &gt; Events\n<ul>\n<li>Generated whenever there is a new configuration change or important operational change from within the RDS instance.<\/li>\n<\/ul>\n<\/li>\n<li>You can retrieve events from RDS\n<ul>\n<li>Console: 24 hr<\/li>\n<li>RDS API: 14 Days<\/li>\n<li>AWS CLI: 14 Days<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Creating an Event Subscription<\/h2>\n<ul>\n<li>RDS &gt; Event Subscriptions &gt; [Create Event Subscription]\n<ul>\n<li>Details:\n<ul>\n<li>Name<\/li>\n<\/ul>\n<\/li>\n<li>Target:\n<ul>\n<li>Send notifications to: Select ARN (Topic)<\/li>\n<\/ul>\n<\/li>\n<li>Source:\n<ul>\n<li>Source Type:\n<ul>\n<li>Instances<\/li>\n<li>Security groups<\/li>\n<li>Parameter groups<\/li>\n<li>Snapshots<\/li>\n<li>DB clusters<\/li>\n<li>DB cluster snapshots<\/li>\n<\/ul>\n<\/li>\n<li>Instances to include:\n<ul>\n<li>All instances<\/li>\n<li>Specific (Select from dropdown)<\/li>\n<\/ul>\n<\/li>\n<li>Event Categories\n<ul>\n<li>All<\/li>\n<li>Select specific\n<ul>\n<li>availability<\/li>\n<li>backtrack<\/li>\n<li>backup<\/li>\n<li>configuration change<\/li>\n<li>creation<\/li>\n<li>deletion<\/li>\n<li>failover<\/li>\n<li>failure<\/li>\n<li>low storage<\/li>\n<li>maintenance<\/li>\n<li>notification<\/li>\n<li>read replica<\/li>\n<li>recovery<\/li>\n<li>restoration<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>Note: by selecting All Instances and All Categories, we should be notified on any change.<\/li>\n<li>[ Create ]\n<ul>\n<li>This took SEVERAL minutes<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Testing<\/h2>\n<ul>\n<li>Reboot the instance\n<ul>\n<li>It took a while before the notifications came through. Might be a yahoo thing.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2>Recap:<\/h2>\n<ul>\n<li>Learned various metrics available<\/li>\n<li>Setup Alarms and Notifications<\/li>\n<li>Viewed Events and create an Event Subscription<\/li>\n<li>Viewed logs<\/li>\n<\/ul>\n<p><a name=\"Quiz\"><\/a><\/p>\n<h1>Quiz<\/h1>\n<h3>What does RDS stand for<\/h3>\n<ul>\n<li>Rational Database Service<\/li>\n<li><strong>Relational Database Service<\/strong><\/li>\n<li>Resolution Database Service<\/li>\n<li>Revolution Database Service<\/li>\n<\/ul>\n<h3>Which of the following key metrics are available for AWS RDS<\/h3>\n<ul>\n<li>CPUUtilization, DatabaseConnections<\/li>\n<li>FreeMemory, FreeStorageSpace<\/li>\n<li>ReadIOPS\/WriteIOPS<\/li>\n<li><strong>All of the above<\/strong><\/li>\n<\/ul>\n<h3>For Monitoring AWS RDS databases, CloudWatch provides:<\/h3>\n<ul>\n<li>Only CloudWatch Alarms<\/li>\n<li>Only CloudWatch Logs<\/li>\n<li>Only CloudWatch Events<\/li>\n<li><strong>All of the above<\/strong><\/li>\n<\/ul>\n<h3>Which of the following metrics is used to check the number of database connections in use:<\/h3>\n<ul>\n<li>DiskQueueDepth<\/li>\n<li><strong>DatabaseConnections<\/strong><\/li>\n<li>ReadThroughput<\/li>\n<li>WriteThroughput<\/li>\n<\/ul>\n<h3>The FreeStorageSpace metric is used to<\/h3>\n<ul>\n<li><strong>Determine the amount of currently available storage space<\/strong><\/li>\n<li>Determine the amount of available Random Access Memory<\/li>\n<li>Determine the number of outstanding IOs waiting to access the disk<\/li>\n<li>Determine the amount of swap space used on the DB instance.<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Main Menu Section Menu Introduction to monitoring and alerting for AWS RDS Monitoring AWS RDS metrics AWS RES events Quiz Introduction to monitoring and alerting for AWS RDS https:\/\/www.udemy.com\/aws-monitoring-alerting-with-aws-cloudwatch-and-aws-sns\/learn\/v4\/t\/lecture\/7082820?start=0 Overview Intro to RDS Key Metric available Monitoring for availability and performance AWS RDS Relational Database Service Provides a scalable database service PaaS &#8211; Platform as ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/wiki.thomasandsofia.com\/?p=1590\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,39],"tags":[],"class_list":["post-1590","post","type-post","status-publish","format-standard","hentry","category-amazon-web-services-aws","category-cloudwatch"],"_links":{"self":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/1590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1590"}],"version-history":[{"count":11,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/1590\/revisions"}],"predecessor-version":[{"id":1603,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=\/wp\/v2\/posts\/1590\/revisions\/1603"}],"wp:attachment":[{"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wiki.thomasandsofia.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}