Skip to content

a93-git/aws-custom-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-custom-metrics

What?

Create metrics for and send metric data for disk space utilization and memory utilization of AWS EC2 instances running Linux

How?

It retrieves the:

  1. Instance id from the instance metadata
  2. memory utilization from /proc/meminfo file
  3. disk space utilization information from df -h output

Requirements

  • Python 2.7+ or Python 3.x
  • Boto3 package

Usage

  1. Check the current python version
python -V
  1. Check Boto 3 is installed
python -m boto3
  • Above command should give an error like below Alt erroMessage
  1. Clone the repo in your local directory
  2. Copy the contents to home directory of current user
  3. Add the following entry in crontab:
*/5 * * * * /path/to/python/executable /home/[username]/customMetrics.py

Resources

  1. How to add a cron job
  2. How to clone a github repo
  3. Boto 3 documentation

About

Create and send custom metric data for disk and memory util on EC2 Linux instances

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published