Skip to content

Commit

Permalink
Merge pull request #208 from lorengordon/log-streams
Browse files Browse the repository at this point in the history
Updates log stream names to more standardized pattern
  • Loading branch information
lorengordon authored Jul 30, 2019
2 parents c2cb8fb + e0969c1 commit b84d02b
Show file tree
Hide file tree
Showing 31 changed files with 77 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.3
current_version = 0.3.4
commit = True
message = Bumps version to {new_version}
tag = False
Expand Down
4 changes: 2 additions & 2 deletions scripts/make-guac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ write_manifest()
printf "\"translations\" : [ \"translations/en.json\" ]\n"
printf "}\n"
) > "${guac_manifest}"
if ! ( [[ -n "${URL_1}" ]] || [[ -n "${URL_2}" ]] )
if ! { [[ -n "${URL_1}" ]] || [[ -n "${URL_2}" ]]; }
then
sed -i '/html/d' "${guac_manifest}"
fi
Expand Down Expand Up @@ -426,7 +426,7 @@ log "Setting up the custom branding extension"
write_manifest "${GUAC_EXT}"
write_brand "${GUAC_EXT}"

if ( [[ -n "${URL_1}" ]] || [[ -n "${URL_2}" ]] )
if [[ -n "${URL_1}" ]] || [[ -n "${URL_2}" ]]
then
# Add custom URLs to Guacamole login page using Guac extensions.
write_links "${GUAC_EXT}"
Expand Down
2 changes: 1 addition & 1 deletion templates/db_mssql_alwayson.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@
}
}
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"MssqlNode1InstanceId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This template deploys a MySQL RDS instance",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"JDBCConnectionString": {
Expand Down
2 changes: 1 addition & 1 deletion templates/ds_ad_primary_dc.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
},
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"DomainAdmin": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates a Route53 private hosted zone, to resolve the domain to the AD Domain Controllers via DHCP.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"HostedZoneId": {
Expand Down
2 changes: 1 addition & 1 deletion templates/ds_ad_replica_dc.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
},
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"DomainControllerID": {
Expand Down
2 changes: 1 addition & 1 deletion templates/ds_ad_security_groups.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates 2 security groups for an Active Directory domain -- one for Domain Controllers and one for Domain Members.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"DomainControllerSGID": {
Expand Down
2 changes: 1 addition & 1 deletion templates/ds_dhcp_options.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates an Active Directory domain with a single domain controller. The default Domain Administrator password will be the one retrieved from the instance.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Parameters": {
"DomainControllerIPs": {
Expand Down
2 changes: 1 addition & 1 deletion templates/ds_singleaz_ad.compound.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This template creates an Active Directory infrastructure in a Single AZ.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"DomainAdmin": {
Expand Down
2 changes: 1 addition & 1 deletion templates/es_service_domain.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}
]
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"DedicatedMasterCount": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_create_peer_role.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This template creates an assumable role for cross account VPC peering.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"RoleARN": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
}
]
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"InternetGatewayId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}
]
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"InternetGatewayId": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_nat_gateway.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates a NAT Gateway with an Elastic IP, Private route table with route to the NAT Gateway.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"NATGatewayElasticIP": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_nat_with_eni.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
}
},
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"NATElasticNetworkInterfaceId": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_peered_sg.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates a Security Group to allow remote access from instances in the specified security group within the peered account.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"VpcPeerSecurityGroupId": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_private_subnet.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates a Private Subnet and associates it with a given Route Table.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"AvailabilityZoneName": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_public_subnet.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates a Public Subnet and associates it with a given Route Table.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"AvailabilityZoneName": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_r53_peered_domain.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates a Route53 Private Hosted Zone and the associated resource records for a peered domain.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"PrivateHostedZoneId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
}
]
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"InternetGatewayId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
}
]
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"InternetGatewayId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
}
]
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"InternetGatewayId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
}
]
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"InternetGatewayId": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
},
"Description": "This element creates a VPC peering connection and adds the necessary route to specified route tables.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"VpcPeeringConnection": {
Expand Down
2 changes: 1 addition & 1 deletion templates/nw_vpc_with_igw.element.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This element creates a VPC network with an Internet Gateway.",
"Metadata": {
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"InternetGatewayId": {
Expand Down
2 changes: 1 addition & 1 deletion templates/ra_guac_autoscale_public_alb.template.cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Mappings:
Parameters:
Location: 's3://app-chemistry/snippets/instance_type_map.snippet.cfn.yaml'
Metadata:
Version: 0.3.3
Version: 0.3.4
cfn-lint:
config:
ignore_checks:
Expand Down
2 changes: 1 addition & 1 deletion templates/ra_rdcb_fileserver_ha.template.cfn.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
}
}
},
"Version": "0.3.3"
"Version": "0.3.4"
},
"Outputs": {
"RdcbEc2InstanceId": {
Expand Down
32 changes: 19 additions & 13 deletions templates/ra_rdcb_fileserver_standalone.template.cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Metadata:
ParameterLabels:
AmiNameSearchString:
default: AMI Name Search Pattern
Version: 0.3.3
Version: 0.3.4
cfn-lint:
config:
ignore_checks:
Expand Down Expand Up @@ -563,13 +563,19 @@ Resources:
{
"file_path": "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\amazon-cloudwatch-agent.log",
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "cloudwatch_agent_logs_{instance_id}",
"log_stream_name": "{instance_id}//c/ProgramData/Amazon/AmazonCloudWatchAgent/Logs/amazon-cloudwatch-agent.log",
"timestamp_format": "%H:%M:%S %y %b %-d"
},
{
"file_path": "c:\\cfn\\log\\cfn-init.log",
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "cloudformation_init_logs_{instance_id}",
"log_stream_name": "{instance_id}//c/cfn/log/cfn-init.log",
"timestamp_format": "%H:%M:%S %y %b %-d"
},
{
"file_path": "c:\\cfn\\log\\cfn-init-cmd.log",
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "{instance_id}//c/cfn/log/cfn-init-cmd.log",
"timestamp_format": "%H:%M:%S %y %b %-d"
}
]
Expand All @@ -578,37 +584,37 @@ Resources:
"collect_list" : [
{
"event_name": "System",
"event_levels": ["WARNING","ERROR"],
"event_levels": ["WARNING", "ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "Windows_System_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/System",
"event_format": "text"
},
{
"event_name": "Application",
"event_levels": ["WARNING","ERROR"],
"event_levels": ["WARNING", "ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "Windows_Application_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/Application",
"event_format": "text"
},
{
"event_name": "Microsoft-Rdms-UI/Operational",
"event_levels": ["WARNING","ERROR", "INFORMATION"],
"event_levels": ["WARNING", "ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "MS-Rdms-UI/Oper_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/MS-Rdms-UI/Operational",
"event_format": "text"
},
{
"event_name": "Microsoft-Windows-TerminalServices-SessionBroker/Operational",
"event_levels": ["WARNING","ERROR", "INFORMATION"],
"event_levels": ["WARNING", "ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "Microsoft-Windows-TerminalServices-SessionBroker/Operational_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/Microsoft-Windows-TerminalServices-SessionBroker/Operational",
"event_format": "text"
},
{
"event_name": "Microsoft-Rdms-UI/Admin",
"event_levels": ["WARNING","ERROR", "INFORMATION"],
"event_levels": ["WARNING", "ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "MS-Rdms-UI/Admin_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/MS-Rdms-UI/Admin",
"event_format": "text"
}
]
Expand Down
22 changes: 14 additions & 8 deletions templates/ra_rdgw_autoscale_public_lb.template.cfn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Metadata:
default: AMI Name Search Pattern
ScaleDownDesiredCapacity:
default: Scale Down Desired Capacity
Version: 0.3.3
Version: 0.3.4
cfn-lint:
config:
ignore_checks:
Expand Down Expand Up @@ -431,13 +431,19 @@ Resources:
{
"file_path": "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\amazon-cloudwatch-agent.log",
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "cloudwatch_agent_logs_{instance_id}",
"log_stream_name": "{instance_id}//c/ProgramData/Amazon/AmazonCloudWatchAgent/Logs/amazon-cloudwatch-agent.log",
"timestamp_format": "%H:%M:%S %y %b %-d"
},
{
"file_path": "c:\\cfn\\log\\cfn-init.log",
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "cloudformation_init_logs_{instance_id}",
"log_stream_name": "{instance_id}//c/cfn/log/cfn-init.log",
"timestamp_format": "%H:%M:%S %y %b %-d"
},
{
"file_path": "c:\\cfn\\log\\cfn-init-cmd.log",
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "{instance_id}//c/cfn/log/cfn-init-cmd.log",
"timestamp_format": "%H:%M:%S %y %b %-d"
}
]
Expand All @@ -446,23 +452,23 @@ Resources:
"collect_list" : [
{
"event_name": "System",
"event_levels": ["WARNING","ERROR"],
"event_levels": ["WARNING", "ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "Windows_System_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/System",
"event_format": "text"
},
{
"event_name": "Application",
"event_levels": ["WARNING","ERROR"],
"event_levels": ["WARNING", "ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "Windows_Application_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/Application",
"event_format": "text"
},
{
"event_name": "Microsoft-Windows-TerminalServices-Gateway/Operational",
"event_levels": ["WARNING","ERROR", "INFORMATION"],
"log_group_name": "${local_InstanceLogGroup}",
"log_stream_name": "RDGW_Connections_{instance_id}",
"log_stream_name": "{instance_id}//EventLog/Microsoft-Windows-TerminalServices-Gateway/Operational",
"event_format": "text"
}
]
Expand Down
Loading

0 comments on commit b84d02b

Please sign in to comment.