Menu
blog.headdesk.me
blog.headdesk.me

Let CloudWatch monitor your disk and memory utilisation

Posted on 2015/07/142016/07/03

It is possible to use CloudWatch to monitor your disk and memory usage. There are very good information on AWS – http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts-perl.html

For the impatient, here is how to get it done.

First, install the required packages

% yum install perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https
% wget http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip

Unzip the zip file into /usr/local/bin. Then create the following cronjob:

*/5 * * * * /usr/local/bin/mon-put-instance-data.pl --disk-path=/ --disk-space-util --from-cron --aws-access-key-id=xxx --aws-secret-key=xxx

That’s it, in a few minutes, you should start seeing the graphs under “Linux System Metrics”. Here is what it looks like

CloudWatch_Management_Console

Of course, to use the cronjob, you need to grant at least CloudWatchFullAccess to a user and replace the “xxx” to the actual id and key.

Loading

facebookShare on Facebook
TwitterTweet

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Full text search

Recent Posts

  • Upgrade RockyLinux 8 to 9
  • Terraform and segregated permissions
  • LVM Compression and Deduplication
  • Edit gpg encrypted file with vim
  • Lelit Elizabeth PL92T Pressure Tuning
  • aws (8)
  • coffee (1)
  • headfi (1)
  • linux (6)
  • others (59)
  • security (2)
  • tech (36)
  • wordpress (2)

Loading

apache apigateway aws awscli azure backup cloud coffee docker ec2 EL8 ElasticBeanstalk enpass espresso featured kernel lelit linux lvm meltdown MFA nat gateway nginx php proliant python rdp Redhat RHEL rpm Ryzen s2s scp serverless site-to-site smartarray snapshot spectre tech terraform transit gateway ubuntu ubuntu upgrade vpn wordpress

©2023 blog.headdesk.me | Powered by SuperbThemes & WordPress