Last active
March 6, 2019 18:38
-
-
Save davidrosenstark/7483a4c888fad4ed054e1b84d7fab572 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: "Monitoring - Dashboard - Http Errors" | |
Parameters: | |
EnvironmentName: | |
Type: String | |
Resources: | |
dashboard: | |
Type: 'AWS::CloudWatch::Dashboard' | |
Properties: | |
DashboardName: !Sub "${EnvironmentName}-server-errors" | |
DashboardBody: | |
!Sub | |
'{ | |
"widgets": [ | |
{ | |
"type": "log", | |
"x": 0, | |
"y": 0, | |
"width": 24, | |
"height": 6, | |
"properties": { | |
"query": "SOURCE ''/${EnvironmentName}/access-logs'' | filter status >= 400 and status <= 499\n| stats count(*) as count by resourcePath as url, status, bin(5m)", | |
"region": "${AWS::Region}", | |
"title": "4xx errors" | |
} | |
}, | |
{ | |
"type": "log", | |
"x": 0, | |
"y": 6, | |
"width": 24, | |
"height": 6, | |
"properties": { | |
"query": "SOURCE ''/${EnvironmentName}/access-logs'' | filter status >= 500 and status <= 599\n| stats count(*) as count by resourcePath as url, status, bin(5m)", | |
"region": "${AWS::Region}", | |
"title": "5xx errors" | |
} | |
} | |
] | |
}' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment