- PreRequsites
- AWS_ACCESS_KEY and AWS_SECRET_KEY to be loaded as environment variables.
- Administrator or similar role availalbe in AWS to create IAM instance profile if needed on AWS
Ansible
(2.9.0) or higher installed with ansible requirements like python 3.8SSH keys
for ec2 instances- ensure that the ssh user is able to switch to
root
user
- How To
-
- Variables for what to monitor like Memory or Disk is maintained in group_vars folder
- cron job expression is also maintained in group_vars folder and this can vary from 1 minute range to 59 minutes
- Playbooks or tasks are setup to be run on Amazon Linux2, Ubuntu, CentOS or RHEL Distros and assuming these to be latest. If you want support for older versions of these distros, please reach out
- These playbooks take the hostname or IP as parameters during the run. If using hostname, ensure these are resolving from the host where you run these playbooks from
-
Generic command to run
ansible-playbook -v -i inventory/hosts playbooks/install_aws_monitoring.yaml -u <ec2 user name> -c paramiko -e working_host=<IP or hostname of ec2 instance > --private-key=~/Downloads/<ec2-keypair>.pem
running in check mode or dry-run
ansible-playbook -v -i inventory/hosts playbooks/install_aws_monitoring.yaml -u ubuntu -c paramiko -e working_host=52.63.254.239 --private-key=~/Downloads/momenton-mel-sydney.pem --check
running to check what tasks will be run
ansible-playbook -v -i inventory/hosts playbooks/install_aws_monitoring.yaml -u ubuntu -c paramiko -e working_host=52.63.254.239 --private-key=~/Downloads/momenton-mel-sydney.pem --list-tasks
running or installing the scripts
ansible-playbook -v -i inventory/hosts playbooks/install_aws_monitoring.yaml -u ubuntu -c paramiko -e working_host=52.63.254.239 --private-key=~/Downloads/momenton-mel-sydney.pem
-
-
Notifications
You must be signed in to change notification settings - Fork 0
momenton/aws-memory-monitor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Ansible playbook to install and collect RAM metrics in Cloudwatch
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published