Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sumo 251683: Added support for AWS tag filters CF #215

Merged
merged 4 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion aws-observability/apps/alb/alb_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the ALB app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the ALB app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the API Gateway app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the API Gateway app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup Auto Enable ALB Access Logging and Lambda Auto Subscribe Log Groups for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup Auto Enable ALB Access Logging and Lambda Auto Subscribe Log Groups for AWS Observability Solution."

Parameters:
SumoLogicResourceRemoveOnDeleteStack:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to Setup Sumo Logic CloudWatch Metric Source. The template setup CW Metrics Sources for Namespaces."
Description: "Version - v2.11.0: Template to Setup Sumo Logic CloudWatch Metric Source. The template setup CW Metrics Sources for Namespaces."

Parameters:
SumoLogicDeployment:
Expand Down Expand Up @@ -55,6 +55,11 @@ Parameters:
Description: "Provide a Source Category for CloudWatch Metrics Source"
Default: ""

MetricsSourceAWSTagFilters:
Type: String
Description: "Provide JSON format of the namespaces with it's tags values for Metrics Source."
Default: ""

CreateFirstMetricsSource:
Type: String
Description: "Select Yes if you would like to create the Metric Source."
Expand Down Expand Up @@ -165,6 +170,7 @@ Resources:
SourceName: !Sub "${CloudWatchMetricsSourceName}-${FirstMetricsSourceNamespace}"
ScanInterval: !FindInMap [Namespaces, !Ref FirstMetricsSourceNamespace, ScanInterval]
SourceCategory: !Ref CloudWatchMetricSourceCategory
AWSTagFilters: !Ref MetricsSourceAWSTagFilters
CollectorId: !Ref SumoLogicCollectorId
SumoAccessID: !Ref SumoLogicAccessID
SumoAccessKey: !Ref SumoLogicAccessKey
Expand All @@ -185,6 +191,7 @@ Resources:
SourceName: !Sub "${CloudWatchMetricsSourceName}-${SecondMetricsSourceNamespace}"
ScanInterval: !FindInMap [Namespaces, !Ref SecondMetricsSourceNamespace, ScanInterval]
SourceCategory: !Ref CloudWatchMetricSourceCategory
AWSTagFilters: !Ref MetricsSourceAWSTagFilters
CollectorId: !Ref SumoLogicCollectorId
SumoAccessID: !Ref SumoLogicAccessID
SumoAccessKey: !Ref SumoLogicAccessKey
Expand All @@ -205,6 +212,7 @@ Resources:
SourceName: !Sub "${CloudWatchMetricsSourceName}-${ThirdMetricsSourceNamespace}"
ScanInterval: !FindInMap [Namespaces, !Ref ThirdMetricsSourceNamespace, ScanInterval]
SourceCategory: !Ref CloudWatchMetricSourceCategory
AWSTagFilters: !Ref MetricsSourceAWSTagFilters
CollectorId: !Ref SumoLogicCollectorId
SumoAccessID: !Ref SumoLogicAccessID
SumoAccessKey: !Ref SumoLogicAccessKey
Expand All @@ -225,6 +233,7 @@ Resources:
SourceName: !Sub "${CloudWatchMetricsSourceName}-${FourthMetricsSourceNamespace}"
ScanInterval: !FindInMap [Namespaces, !Ref FourthMetricsSourceNamespace, ScanInterval]
SourceCategory: !Ref CloudWatchMetricSourceCategory
AWSTagFilters: !Ref MetricsSourceAWSTagFilters
CollectorId: !Ref SumoLogicCollectorId
SumoAccessID: !Ref SumoLogicAccessID
SumoAccessKey: !Ref SumoLogicAccessKey
Expand All @@ -245,6 +254,7 @@ Resources:
SourceName: !Sub "${CloudWatchMetricsSourceName}-${FifthMetricsSourceNamespace}"
ScanInterval: !FindInMap [Namespaces, !Ref FifthMetricsSourceNamespace, ScanInterval]
SourceCategory: !Ref CloudWatchMetricSourceCategory
AWSTagFilters: !Ref MetricsSourceAWSTagFilters
CollectorId: !Ref SumoLogicCollectorId
SumoAccessID: !Ref SumoLogicAccessID
SumoAccessKey: !Ref SumoLogicAccessKey
Expand Down
12 changes: 10 additions & 2 deletions aws-observability/apps/common/resources.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to Setup Sumo Logic Sources and supporting AWS Resources for CloudTrail, ALB, Lambda CloudWatch Logs and CloudWatch Metrics."
Description: "Version - v2.11.0: Template to Setup Sumo Logic Sources and supporting AWS Resources for CloudTrail, ALB, Lambda CloudWatch Logs and CloudWatch Metrics."

Parameters:
SumoLogicDeployment:
Expand Down Expand Up @@ -99,6 +99,10 @@ Parameters:
Type: String
Description: "Provide a source Category for the CloudWatch Metrics Source."
Default: ""
MetricsSourceAWSTagFilters:
Type: String
Description: "Provide JSON format of the namespaces with it's tags values for Metrics Source."
Default: ""

CreateKinesisFirehoseMetricsSource:
Type: String
Expand Down Expand Up @@ -487,7 +491,7 @@ Resources:
Description: "Lambda Function for deploying SumoLogic AWS Observability Solution."
CodeUri:
Bucket: !FindInMap [ RegionMap, !Ref 'AWS::Region', bucketname ]
Key: "sumologic-aws-observability/apps/SumoLogicAWSObservabilityHelper/SumoLogicAWSObservabilityHelperv2.0.19.zip"
Key: "sumologic-aws-observability/apps/SumoLogicAWSObservabilityHelper/SumoLogicAWSObservabilityHelperv2.0.20.zip"
MemorySize: 128
Timeout: 900
Role:
Expand Down Expand Up @@ -1138,6 +1142,7 @@ Resources:
SumoLogicSourceRole: !GetAtt SumoLogicSourceRole.Arn
CloudWatchMetricsSourceName: !Ref CloudWatchMetricsSourceName
CloudWatchMetricSourceCategory: !Ref CloudWatchMetricSourceCategory
MetricsSourceAWSTagFilters: !Ref MetricsSourceAWSTagFilters
CreateFirstMetricsSource: !GetAtt Primerinvoke.ApplicationELB
FirstMetricsSourceNamespace: "ApplicationELB"
CreateSecondMetricsSource: !GetAtt Primerinvoke.ApiGateway
Expand Down Expand Up @@ -1165,6 +1170,7 @@ Resources:
SumoLogicSourceRole: !GetAtt SumoLogicSourceRole.Arn
CloudWatchMetricsSourceName: !Ref CloudWatchMetricsSourceName
CloudWatchMetricSourceCategory: !Ref CloudWatchMetricSourceCategory
MetricsSourceAWSTagFilters: !Ref MetricsSourceAWSTagFilters
CreateFirstMetricsSource: !GetAtt Primerinvoke.ECS
FirstMetricsSourceNamespace: "ECS"
CreateSecondMetricsSource: !GetAtt Primerinvoke.ElastiCache
Expand Down Expand Up @@ -1193,6 +1199,7 @@ Resources:
SumoLogicSourceRole: !GetAtt SumoLogicSourceRole.Arn
CloudWatchMetricsSourceName: !Ref CloudWatchMetricsSourceName
CloudWatchMetricSourceCategory: !Ref CloudWatchMetricSourceCategory
MetricsSourceAWSTagFilters: !Ref MetricsSourceAWSTagFilters
CreateFirstMetricsSource: !GetAtt Primerinvoke.SQS
FirstMetricsSourceNamespace: "SQS"
CreateSecondMetricsSource: !GetAtt Primerinvoke.SNS
Expand Down Expand Up @@ -1231,6 +1238,7 @@ Resources:
SourceName: !Ref KinesisFirehoseMetricsSourceName
RemoveOnDeleteStack: !Ref RemoveSumoLogicResourcesOnDeleteStack
SourceCategory: !Ref KinesisFirehoseMetricSourceCategory
AWSTagFilters: !Ref MetricsSourceAWSTagFilters
CollectorId: !GetAtt SumoLogicHostedCollector.COLLECTOR_ID
SumoAccessID: !Ref SumoLogicAccessID
SumoAccessKey: !Ref SumoLogicAccessKey
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: "Version - v2.10.0: The Template should be deployed in Master account. This template setup the Lambda trigger for new account created using AWS Control Tower Account Factory process. The Lambda install the AWS Observability CF template on the regions of new AWS account using stack Sets."
Description: "Version - v2.11.0: The Template should be deployed in Master account. This template setup the Lambda trigger for new account created using AWS Control Tower Account Factory process. The Lambda install the AWS Observability CF template on the regions of new AWS account using stack Sets."

Globals:
Function:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the DynamoDB app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the DynamoDB app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the EC2 Metrics app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the EC2 Metrics app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
AWS::CloudFormation::Interface:
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/apps/ecs/ecs_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the ECS app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the ECS app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the ElastiCache app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the ElastiCache app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/apps/elb/elb_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the ELB classic app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the ELB classic app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: "Version - v2.10.0: Lambda Function to add fields to host metrics sources based on the available instances in all regions of the current AWS account."
Description: "Version - v2.11.0: Lambda Function to add fields to host metrics sources based on the available instances in all regions of the current AWS account."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/apps/lambda/lambda_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the Lambda app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the Lambda app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/apps/nlb/nlb_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the NLB app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the NLB app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: "Version - v2.10.0: This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Description: "Version - v2.11.0: This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Transform: 'AWS::Serverless-2016-10-31'

Metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: "Version - v2.10.0: This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Description: "Version - v2.11.0: This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Transform: 'AWS::Serverless-2016-10-31'

Metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: "Version - v2.10.0: Note: Before deploying this template, please select the appropriate region. This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Description: "Version - v2.11.0: Note: Before deploying this template, please select the appropriate region. This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Transform: 'AWS::Serverless-2016-10-31'

Metadata:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: "Version - v2.10.0. Note: Before deploying this template, please select the appropriate region. This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Description: "Version - v2.11.0. Note: Before deploying this template, please select the appropriate region. This CloudFormation template will check for the permission required to deploy the AWS Observability CF template. Based on various error received, please provide the specific permissions to Sumo Logic role or AWS IAM Role used to deploy the template."
Transform: 'AWS::Serverless-2016-10-31'

Metadata:
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/apps/rds/rds_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the RDS app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the RDS app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the Sumo Logic AWS Inventory Source and Root Cause Explorer app."
Description: "Version - v2.11.0: Template to setup the Sumo Logic AWS Inventory Source and Root Cause Explorer app."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/apps/sns/sns_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the SNS app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the SNS app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/apps/sqs/sqs_app.template.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: "Version - v2.10.0: Template to setup the SQS app with AWS and Sumo Logic resources for AWS Observability Solution."
Description: "Version - v2.11.0: Template to setup the SQS app with AWS and Sumo Logic resources for AWS Observability Solution."

Metadata:
'AWS::CloudFormation::Interface':
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/scripts/JsonToS3.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo "Start S3 upload Script....."
export AWS_PROFILE="prod"

export bucket_name=sumologic-appdev-aws-sam-apps
export version=v2.10.0
export version=v2.11.0
export match_case="App"

if [[ ${AWS_PROFILE} == 'default' ]]
Expand Down
2 changes: 1 addition & 1 deletion aws-observability/scripts/YamlToS3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fi
# Upload all templates to sumologic-appdev-aws-sam-apps bucket with version information.
if [[ ${AWS_PROFILE} == 'default' ]]
then
export version=v2.10.0
export version=v2.11.0

aws s3 cp apps/ s3://${bucket_name}/aws-observability-versions/${version}/ --recursive --include "*.template.yaml" --exclude '*.zip' --exclude '*.sh' --exclude 'apps/*/test/*' --exclude '*/test/*' --acl public-read --profile ${AWS_PROFILE}

Expand Down
Loading
Loading