mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Add CloudWatch metrics filters
This commit is contained in:
@ -142,7 +142,7 @@ Resources:
|
||||
Resource:
|
||||
- "*"
|
||||
|
||||
# CloudWatch
|
||||
# CloudWatch log groups
|
||||
LogGroup:
|
||||
Type: AWS::Logs::LogGroup
|
||||
Properties:
|
||||
@ -154,6 +154,57 @@ Resources:
|
||||
LogGroupName: !Ref LogGroup
|
||||
LogStreamName: "Backend"
|
||||
|
||||
# CloudWatch metric filters
|
||||
GetFeedMetricFilter:
|
||||
Type: AWS::Logs::MetricFilter
|
||||
Properties:
|
||||
LogGroupName: !Ref LogGroup
|
||||
FilterPattern: '{ $.event = "get_feed" && $.error NOT EXISTS }'
|
||||
MetricTransformations:
|
||||
- MetricName: "Feed requests"
|
||||
MetricNamespace: !Sub "${AWS::StackName}_Podsync"
|
||||
MetricValue: 1
|
||||
|
||||
GetFeedErrorMetricFilter:
|
||||
Type: AWS::Logs::MetricFilter
|
||||
Properties:
|
||||
LogGroupName: !Ref LogGroup
|
||||
FilterPattern: '{ $.event = "get_feed" && $.error != "" }'
|
||||
MetricTransformations:
|
||||
- MetricName: "Feed errors"
|
||||
MetricNamespace: !Sub "${AWS::StackName}_Podsync"
|
||||
MetricValue: 1
|
||||
|
||||
GetFeedMetadataMetricFilter:
|
||||
Type: AWS::Logs::MetricFilter
|
||||
Properties:
|
||||
LogGroupName: !Ref LogGroup
|
||||
FilterPattern: '{ $.event = "get_metadata" && $.error NOT EXISTS }'
|
||||
MetricTransformations:
|
||||
- MetricName: "Metadata requests"
|
||||
MetricNamespace: !Sub "${AWS::StackName}_Podsync"
|
||||
MetricValue: 1
|
||||
|
||||
CreateFeedMetricFilter:
|
||||
Type: AWS::Logs::MetricFilter
|
||||
Properties:
|
||||
LogGroupName: !Ref LogGroup
|
||||
FilterPattern: '{ $.event = "create_feed" && $.error NOT EXISTS }'
|
||||
MetricTransformations:
|
||||
- MetricName: "Create feed"
|
||||
MetricNamespace: !Sub "${AWS::StackName}_Podsync"
|
||||
MetricValue: 1
|
||||
|
||||
CreateFeedErrorMetricFilter:
|
||||
Type: AWS::Logs::MetricFilter
|
||||
Properties:
|
||||
LogGroupName: !Ref LogGroup
|
||||
FilterPattern: '{ $.event = "create_feed" && $.error != "" }'
|
||||
MetricTransformations:
|
||||
- MetricName: "Create feed error"
|
||||
MetricNamespace: !Sub "${AWS::StackName}_Podsync"
|
||||
MetricValue: 1
|
||||
|
||||
# Access from DigitalOcean VM
|
||||
DOUser:
|
||||
Type: AWS::IAM::User
|
||||
|
@ -32,6 +32,7 @@ services:
|
||||
awslogs-region: "us-east-1"
|
||||
awslogs-group: "Prod"
|
||||
awslogs-stream: "Backend"
|
||||
awslogs-multiline-pattern: "{"
|
||||
ytdl:
|
||||
image: mxpv/ytdl
|
||||
container_name: ytdl
|
||||
|
Reference in New Issue
Block a user