Skip to content

Commit 0bbd489

Browse files
Added support for AutoSubscribeLogGroupByTags
1 parent a8c939b commit 0bbd489

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

aws-observability/apps/autoenable/auto_enable.template.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ Parameters:
7070
Type: String
7171
Default: '\/aws\/(lambda|apigateway|rds)'
7272
Description: "Enter regex for matching logGroups. Regex will check for the name. Visit https://help.sumologic.com/docs/send-data/collect-from-other-data-sources/autosubscribe-arn-destination/#configuringparameters"
73+
AutoSubscribeLogGroupByTags:
74+
Type: String
75+
Default: ""
76+
Description: "Enter comma separated key value pairs for filtering logGroups using tags. Ex KeyName1=string,KeyName2=string. This is optional leave it blank if tag based filtering is not needed. Visit https://help.sumologic.com/docs/send-data/collect-from-other-data-sources/autosubscribe-arn-destination/#configuringparameters"
7377
AutoSubscribeRoleArn:
7478
Type: String
7579
Default: ""
@@ -159,5 +163,6 @@ Resources:
159163
DestinationArnType: !Ref AutoSubscribeDestinationARNType
160164
DestinationArnValue: !Ref AutoSubscribeDestinationARN
161165
LogGroupPattern: !Ref AutoSubscribeLambdaLogGroupPattern
166+
LogGroupTags: !Ref AutoSubscribeLogGroupByTags
162167
UseExistingLogs: !If [auto_subscribe_exisitng_log_groups, "true", "false"]
163168
RoleArn: !Ref AutoSubscribeRoleArn

aws-observability/templates/sumologic_observability.master.template.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ Metadata:
5656
- Section7bLambdaCloudWatchLogsSourceUrl
5757
- Section7cAutoSubscribeLogGroupsOptions
5858
- Section7dAutoSubscribeLogGroupPattern
59+
- Section7eAutoSubscribeLogGroupByTags
5960

6061
- Label:
6162
default: "8. Sumo Logic Root Cause Explorer Sources"
@@ -134,6 +135,9 @@ Metadata:
134135
default: "Subscribe log groups to Destination (Lambda or kinesis firehose delivery stream)"
135136
Section7dAutoSubscribeLogGroupPattern:
136137
default: "Regex for filtering CloudWatch Log Groups. If you want to collect from all CloudWatch Log Groups use .*"
138+
Section7eAutoSubscribeLogGroupByTags:
139+
default: "Tags for filtering CloudWatch Log Groups."
140+
137141

138142
Section8aRootCauseExplorerOptions:
139143
default: "Select the Sumo Logic Root Cause Explorer Sources"
@@ -324,6 +328,10 @@ Parameters:
324328
Type: String
325329
Default: '\/aws\/(lambda|apigateway|rds)'
326330
Description: "Enter regex for matching CloudWatch Log groups name. Regex will check for the Log group name. Visit https://help.sumologic.com/03Send-Data/Collect-from-Other-Data-Sources/Auto-Subscribe_AWS_Log_Groups_to_a_Lambda_Function#Configuring_parameters"
331+
Section7eAutoSubscribeLogGroupByTags:
332+
Type: String
333+
Default: ""
334+
Description: "Enter comma separated key value pairs for filtering logGroups using tags. Ex KeyName1=string,KeyName2=string. This is optional leave it blank if tag based filtering is not needed. Visit https://help.sumologic.com/docs/send-data/collect-from-other-data-sources/autosubscribe-arn-destination/#configuringparameters"
327335

328336
Section8aRootCauseExplorerOptions:
329337
Type: String
@@ -475,7 +483,7 @@ Mappings:
475483
CommonData:
476484
NestedTemplate:
477485
BucketName: "sumologic-appdev-aws-sam-apps"
478-
Version: "v2.10.0"
486+
Version: "v2.11.0"
479487
CollectorDetails:
480488
SumoLogicAccountID: 926226587429
481489
CollectorNamePrefix: "aws-observability"
@@ -627,7 +635,7 @@ Resources:
627635
scanInterval: 60
628636
ToUpdate:
629637
Fn::Base64: !Sub
630-
- "${a}-${b}-${c}-${d}-${e}-${f}-${g}-${h}-${i}-${j}-${k}-${l}-${m}-${n}-${o}-${p}-${q}-${r}-${s}-${t}-${u}-${v}"
638+
- "${a}-${b}-${c}-${d}-${e}-${f}-${g}-${h}-${i}-${j}-${k}-${l}-${m}-${n}-${o}-${p}-${q}-${r}-${s}-${t}-${u}-${v}-${w}"
631639
- a: !Ref Section2aAccountAlias
632640
b: !Ref Section3aInstallObservabilityApps
633641
c: !Ref Section4aCreateMetricsSourceOptions
@@ -644,12 +652,13 @@ Resources:
644652
n: !Ref Section7bLambdaCloudWatchLogsSourceUrl
645653
o: !Ref Section7cAutoSubscribeLogGroupsOptions
646654
p: !Ref Section7dAutoSubscribeLogGroupPattern
647-
q: !Ref Section9aAutoEnableS3LogsELBResourcesOptions
648-
r: !Ref Section9bELBCreateLogSource
649-
s: !Ref Section9cELBLogsSourceUrl
650-
t: !Ref Section9dELBS3LogsBucketName
651-
u: !Ref Section10aAppInstallLocation
652-
v: !FindInMap [CommonData, NestedTemplate, Version]
655+
q: !Ref Section7eAutoSubscribeLogGroupByTags
656+
r: !Ref Section9aAutoEnableS3LogsELBResourcesOptions
657+
s: !Ref Section9bELBCreateLogSource
658+
t: !Ref Section9cELBLogsSourceUrl
659+
u: !Ref Section9dELBS3LogsBucketName
660+
v: !Ref Section10aAppInstallLocation
661+
w: !FindInMap [CommonData, NestedTemplate, Version]
653662

654663
CreateCommonResources:
655664
Type: AWS::CloudFormation::Stack
@@ -729,6 +738,7 @@ Resources:
729738
AutoSubscribeDestinationARNType: !If [create_kf_logs_source, "Kinesis", "Lambda" ]
730739
AutoSubscribeDestinationARN: !If [create_kf_logs_source, !GetAtt CreateCommonResources.Outputs.KinesisLogsDeliveryStreamARN, !If [ create_cw_logs_source, !GetAtt CreateCommonResources.Outputs.CloudWatchLambdaARN, "" ] ]
731740
AutoSubscribeLambdaLogGroupPattern: !Ref Section7dAutoSubscribeLogGroupPattern
741+
AutoSubscribeLogGroupByTags: !Ref Section7eAutoSubscribeLogGroupByTags
732742
AutoSubscribeRoleArn: !If [create_kf_logs_source, !GetAtt CreateCommonResources.Outputs.KinesisLogsRoleARN, "" ]
733743
ELBAutoEnableS3Logs: !If [auto_enable_s3_logs_elb, "Yes", "No"]
734744
ELBAutoEnableS3LogsOptions: !Ref Section9aAutoEnableS3LogsELBResourcesOptions

0 commit comments

Comments
 (0)