Create metrics for and send metric data for disk space utilization and memory utilization of AWS EC2 instances running Linux
It retrieves the:
- Instance id from the instance metadata
- memory utilization from /proc/meminfo file
- disk space utilization information from df -h output
- Python 2.7+ or Python 3.x
- Boto3 package
- Check the current python version
python -V- Check Boto 3 is installed
python -m boto3- Clone the repo in your local directory
- Copy the contents to home directory of current user
- Add the following entry in crontab:
*/5 * * * * /path/to/python/executable /home/[username]/customMetrics.py