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

Fix schema warnings from Ajv #73

Merged
merged 6 commits into from
Jan 19, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,15 @@ custom:
ExtendedStatistic: p99
Threshold: 5000
States: # Step Functions
Statistic: Sum
ExecutionsThrottled:
Threshold: 0
Statistic: Sum
jakejscott marked this conversation as resolved.
Show resolved Hide resolved
ExecutionsFailed:
Threshold: 0
Statistic: Sum
ExecutionsTimedOut:
Threshold: 0
Statistic: Sum
DynamoDB:
# Consumed read/write capacity units are not alarmed. These should either
# be part of an auto-scaling configuration for provisioned mode or should be automatically
Expand Down
5 changes: 5 additions & 0 deletions serverless-plugin/config-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ const commonAlarmProperties = {
const alarmSchemas = {}
for (const service of Object.keys(supportedAlarms)) {
alarmSchemas[service] = {
type: 'object',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to include these!

properties: {
...commonAlarmProperties
},
additionalProperties: false
}
for (const metricAlarm of supportedAlarms[service]) {
alarmSchemas[service].properties[metricAlarm] = {
type: 'object',
properties: {
...commonAlarmProperties
},
Expand Down Expand Up @@ -117,13 +119,15 @@ const commonWidgetProperties = {
const widgetSchemas = {}
for (const service of Object.keys(supportedWidgets)) {
widgetSchemas[service] = {
type: 'object',
properties: {
...commonWidgetProperties
},
additionalProperties: false
}
for (const metricWidget of supportedWidgets[service]) {
widgetSchemas[service].properties[metricWidget] = {
type: 'object',
properties: {
...commonWidgetProperties
},
Expand Down Expand Up @@ -154,6 +158,7 @@ const dashboardSchema = {
}]
},
widgets: {
type: 'object',
properties: {
...commonWidgetProperties,
...widgetSchemas
Expand Down
9 changes: 7 additions & 2 deletions serverless-plugin/default-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@ alarms:
ExtendedStatistic: p99
Threshold: 5000
States: # Step Functions
Statistic: Sum
ExecutionThrottled:
Statistic: Sum
jakejscott marked this conversation as resolved.
Show resolved Hide resolved
Threshold: 0
ExecutionsFailed:
Statistic: Sum
Threshold: 0
ExecutionsTimedOut:
Statistic: Sum
Threshold: 0
DynamoDB:
# Consumed read/write capacity units are not alarmed. These should either
Expand All @@ -46,14 +48,17 @@ alarms:
# to alert failures in these scenarios.
# Throttles can occur in normal operation and are handled with retries. Threshold should
# therefore be configured to provide meaningful alarms based on higher than average throttling.
Statistic: Sum
ReadThrottleEvents:
Statistic: Sum
Threshold: 10
WriteThrottleEvents:
Statistic: Sum
Threshold: 10
UserErrors:
Statistic: Sum
Threshold: 0
SystemErrors:
Statistic: Sum
Threshold: 0
Kinesis:
GetRecords.IteratorAgeMilliseconds:
Expand Down
Loading