DCD-930: Consolidate log definitions and forward audit logs to cloudwatch.

This commit is contained in:
Steve Smith
2020-02-04 09:02:52 +11:00
parent d4a72ea11a
commit b8d09dee65
3 changed files with 24 additions and 22 deletions

View File

@@ -10,5 +10,8 @@ atl_aws_enable_cloudwatch_logs: false
# Mostly for molecule testing, as skip-tags doesn't work with handlers.
atl_aws_agent_restart: true
atl_aws_log_group: "{{ atl_product_edition }}-{{ atl_aws_stack_name }}"
atl_aws_provisioning_log_group: "{{ atl_aws_log_group }}-provisioning"
atl_aws_log_group_base: "{{ atl_product_edition }}-{{ atl_aws_stack_name }}"
atl_aws_log_groups:
product: "{{ atl_aws_log_group_base }}"
audit: "{{ atl_aws_log_group_base }}-audit"
provisioning: "{{ atl_aws_log_group_base }}-provisioning"

View File

@@ -11,19 +11,11 @@
"collect_list": [
{% set comma = joiner(',') %}
{% for path in atl_product_log_locations[atl_product_family] %}
{% for logspec in atl_product_logs[atl_product_family] %}
{{ comma() }}
{
"file_path": "{{ path }}/*",
"log_group_name": "{{ atl_aws_log_group }}",
"log_stream_name": "{instance_id}"
}
{% endfor %}
{% for path in atl_provisioner_log_locations %}
{{ comma() }}
{
"file_path": "{{ path }}",
"log_group_name": "{{ atl_aws_provisioning_log_group }}",
"file_path": "{{ logspec.path }}",
"log_group_name": "{{ atl_aws_log_groups[logspec.type] }}",
"log_stream_name": "{instance_id}"
}
{% endfor %}