Ansible role to install and configure AWS Cloudwatch Agent on both Windows and Linux.
ansible.windows collection
Available variables are listed below, along with default values (see defaults/main.yml
):
aws_cw_region: us-east-1
Windows EventLog Monitoring
aws_cw_windows_events:
- name: 'System'
levels: ['ERROR', 'CRITICAL']
format: 'text'
log_group: 'Windows/System'
- name: 'Application'
levels: ['ERROR']
format: 'text'
log_group: 'Windows/Application'
Log files Monitoring
aws_cw_logfiles
- path: /var/log/auth.log
timestamp_format: "%b %d %H:%M:%S"
log_group: "auth"
Allows to use custom cloudwatch template e.g. the following can be put same level as the playbook
aws_cw_config_template_path: 'templates/CloudwatchConfig.json'
Enable Debug Log
aws_cw_log_debug: true
Configuration for On-Prem - Requires to create default AWS profile with access and secret key
aws_cw_agent_type: onPremise
aws_profie: AmazonCloudWatchAgent
aws_profile_path: '/tmp/credentials'
None.
- hosts: all
roles:
- role: deekayen.aws_cloudwatch_agent
vars:
aws_cw_region: us-east-2
MIT / BSD
This role was created in 2019 by Ripon Banik