{"id":24550,"date":"2016-07-12T11:48:27","date_gmt":"2016-07-12T11:48:27","guid":{"rendered":"http:\/\/greenpages.com\/?p=6709"},"modified":"2016-07-12T11:48:27","modified_gmt":"2016-07-12T11:48:27","slug":"aws-monitoring-the-memory-of-your-virtual-machine-ami","status":"publish","type":"post","link":"https:\/\/icloud.pe\/blog\/aws-monitoring-the-memory-of-your-virtual-machine-ami\/","title":{"rendered":"AWS \u2013 Monitoring the Memory of your Virtual Machine (AMI)"},"content":{"rendered":"<p>Out of the box, AWS CloudWatch by default monitors 4 things:<\/p>\n<ol>\n<li>CPU<\/li>\n<li>Network<\/li>\n<li>Disk<\/li>\n<li>Status Checks<\/li>\n<\/ol>\n<p>Can you tell which resource CloudWatch doesn\u2019t monitor out of the box? Memory! (update: \u00a0According to AWS technical support \u201cRight now, you do not need to deploy anything in you AMI to monitor your instance. Metrics like memory utilization and disk space require us to look into the OS running in the instance and that is why we do not have these valuable metrics. \u00a0We are looking at ways to provide more insight into your OS and applications and will have more details as we firm up the plans\u201d). \u00a0Amazon provides 2 articles for doing this, one for <a href=\"http:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/UserGuide\/mon-scripts.html\" >most Linux flavors<\/a> and another for <a href=\"http:\/\/docs.aws.amazon.com\/AWSEC2\/latest\/WindowsGuide\/send_logs_to_cwl.html\" >Windows<\/a>. This article is basically a walkthrough of the Linux article (since I know Windows and want to learn more Linux anyway).<\/p>\n<ol>\n<li>Create a CloudWatch role in IAM (if you don\u2019t know how to do this see <a href=\"http:\/\/mistwire.com\/2016\/05\/aws-certified-solutions-architect-associate-study-notes\/\" >my previous article<\/a>)<\/li>\n<li>Spin up a new Amazon Linux AMI instance using the new CloudWatch role in the IAM section of the instance creation (check out <a href=\"http:\/\/mistwire.com\/2016\/05\/how-to-get-your-free-aws-account-spin-up-your-first-vm\/\" >THIS article<\/a> if you get stuck)<\/li>\n<li>\n<div>SSH into your new instance &amp; run the following command:<\/div>\n<ol>\n<li><strong>sudo yum install perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https<br \/>\n<\/strong><\/li>\n<li><strong>curl http:\/\/aws-cloudwatch.s3.amazonaws.com\/downloads\/CloudWatchMonitoringScripts-1.2.1.zip -O<br \/>\n<\/strong><\/li>\n<li><strong>unzip CloudWatchMonitoringScripts-1.2.1.zip<br \/>\n<\/strong><\/li>\n<li><strong>rm CloudWatchMonitoringScripts-1.2.1.zip<br \/>\n<\/strong><\/li>\n<li><strong>cd aws-scripts-mon<br \/>\n<\/strong><\/li>\n<\/ol>\n<\/li>\n<li>At this point you have downloaded and unzipped the Perl script necessary to make the remote calls to CloudWatch and installed the Perl bits needed to run said script.<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><em>To read the rest of Chris&#8217; post, <a href=\"http:\/\/mistwire.com\/2016\/07\/aws-monitoring-the-memory-of-your-virtual-machine-ami\/\" >click here<\/a>!<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>By Chris Williams, Enterprise Consultant<\/p>\n<p>&nbsp;<\/p>\n<div class=\"feedflare\">\n<a href=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?a=asGYD3-GrJU:KwC1DiJr4nM:yIl2AUoC8zA\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?d=yIl2AUoC8zA\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?a=asGYD3-GrJU:KwC1DiJr4nM:-BTjWOF_DHI\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?i=asGYD3-GrJU:KwC1DiJr4nM:-BTjWOF_DHI\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?a=asGYD3-GrJU:KwC1DiJr4nM:V_sGLiPBpWU\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?i=asGYD3-GrJU:KwC1DiJr4nM:V_sGLiPBpWU\" border=\"0\"><\/img><\/a> <a href=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?a=asGYD3-GrJU:KwC1DiJr4nM:qj6IDK7rITs\"><img decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~ff\/JourneyToTheCloud?d=qj6IDK7rITs\" border=\"0\"><\/img><\/a>\n<\/div>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/feeds.feedburner.com\/~r\/JourneyToTheCloud\/~4\/asGYD3-GrJU\" height=\"1\" width=\"1\" alt=\"\"\/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Out of the box, AWS CloudWatch by default monitors 4 things: CPU Network Disk Status Checks Can you tell which resource CloudWatch doesn&rsquo;t monitor out of the box? Memory! (update: &nbsp;According to AWS technical support &ldquo;Right now, you do not need to deploy anything in you AMI to monitor your instance. Metrics like memory utilization&#8230;  <a href=\"http:\/\/greenpages.com\/cloud\/aws-monitoring-the-memory-of-your-virtual-machine-ami\/\" title=\"ReadAWS &ndash; Monitoring the Memory of your Virtual Machine (AMI)\">Read more &raquo;<\/a><\/p>\n","protected":false},"author":61,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57],"tags":[18],"class_list":["post-24550","post","type-post","status-publish","format-standard","hentry","category-aws","tag-cloud"],"_links":{"self":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts\/24550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/users\/61"}],"replies":[{"embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/comments?post=24550"}],"version-history":[{"count":1,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts\/24550\/revisions"}],"predecessor-version":[{"id":24551,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/posts\/24550\/revisions\/24551"}],"wp:attachment":[{"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/media?parent=24550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/categories?post=24550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icloud.pe\/blog\/wp-json\/wp\/v2\/tags?post=24550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}