amritsingh.ec2_monitor
ansible_ec2_monitor
Ansible Role to set up CloudWatch Monitoring Scripts and keep track of Memory and Disk Metrics for Amazon EC2 Linux Instances.
Role Variables
You need to define the following variables:
- cloud_watch_monitoring_path - The location where the scripts will be downloaded and extracted.
- cron_specs - A structured setting that includes:
- name: "Name of the task"
- minute: "*/5"
- hour: "*"
- job: "{{cloud_watch_monitoring_path}}/aws-scripts-mon/mon-put-instance-data.pl --disk-space-util --disk-path=/mnt/data --from-cron --aws-access-key-id=AWS_KEY --aws-secret-key=AWS_SECRET_KEY"
Note: No default values are provided for these variables.
Dependencies
This package does not require any additional modules that are not included with Ansible by default.
Install
To install the role, use the following command:
$ ansible-galaxy install amritsingh.ec2_monitor
Usage
Here is an example of how to use it in site.yml
:
$ cat site.yml
---
- hosts: all
remote_user: centos
become: yes
become_method: sudo
roles:
- role: "amritsingh.ec2_monitor"
cloud_watch_monitoring_path: "/opt"
cron_specs:
- name: "Send Memory And Disk Usage Statistics"
minute: "*/5"
hour: "*"
job: >
{{cloud_watch_monitoring_path}}/aws-scripts-mon/mon-put-instance-data.pl
--disk-space-util
--disk-path=/
--disk-path=/data
--disk-space-used
--disk-space-avail
--mem-util
--mem-used
--mem-avail
--from-cron
--aws-access-key-id=your_aws_access_key_id
--aws-secret-key=your_aws_secret_key
License
Apache License
Author Information
Created by Amrit Singh Follow on Twitter: https://www.twitter.com/_amrit_
Informazioni sul progetto
Ansible Role to install CloudWatchMonitoringScripts and Monitor Memory and Disk Metrics for Amazon EC2 Linux Instances
Installa
ansible-galaxy install amritsingh.ec2_monitor
Licenza
apache-2.0
Download
8.1k
Proprietario
Geek, Programmer, Hacker, Techie...