riponbanik.ansible_role_aws_cloudwatch_agent
Ansible Role to Install and Set Up AWS CloudWatch Agent on Windows and Linux
Requirements
None.
Role Variables
Here are the available variables with their default values (check defaults/main.yml
):
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"
Custom CloudWatch Template
You can use a custom CloudWatch configuration template. Place it in the same directory as your playbook:
aws_cw_config_template_path: 'templates/CloudwatchConfig.json'
Enable Debug Log
To enable debug logging, use:
aws_cw_log_debug: true
Configuration for On-Premises
If you're setting this up on your own servers, you need to create a default AWS profile with access and secret keys:
aws_cw_agent_type: onPremise
aws_profile: AmazonCloudWatchAgent
aws_profile_path: '/tmp/credentials'
Dependencies
None.
Example Playbook
Here’s an example playbook to use this role:
- hosts: all
roles:
- { role: riponbanik.aws-cloudwatch-agent }
License
MIT / BSD
Author Information
This role was created in 2019 by Ripon Banik
Informazioni sul progetto
Monitoring Metrics and Logs via Cloudwatch Agent
Installa
ansible-galaxy install riponbanik.ansible_role_aws_cloudwatch_agent
Licenza
mit
Download
9.8k
Proprietario
Explorer of new technology