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

chore: Adds new alert configuration example. #1059

Merged
merged 2 commits into from
Jun 13, 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This template creates an encryption at rest on the MongoDB Atlas API, this will be billed to your Atlas account.",
"Description": "This template creates an e-mail alert configuration through the MongoDB Atlas Admin API, this will be billed to your Atlas account.",
"Parameters": {
"Profile": {
"Type": "String",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "This template creates a Microsoft Teams alert configuration through the MongoDB Atlas Admin API, this will be billed to your Atlas account.",
"Parameters": {
"Profile": {
"Type": "String",
"Description": "Your MongoDB Atlas Profile Name created in secret manager",
"Default": "default"
},
"ProjectId": {
"Type": "String",
"Description": "",
"Default": "",
"ConstraintDescription": ""
},
"Enabled": {
"Type": "String",
"Description": "",
"Default": "true",
"ConstraintDescription": ""
},
"MicrosoftTeamsWebhookUrl": {
"Type": "String",
"Description": "",
"Default": ""
}
},
"Mappings": {},
"Resources": {
"AlertConfiguration": {
"Type": "MongoDB::Atlas::AlertConfiguration",
"Properties": {
"Profile": {
"Ref": "Profile"
},
"ProjectId": {
"Ref": "ProjectId"
},
"Enabled": {
"Ref": "Enabled"
},
"EventTypeName": "OUTSIDE_METRIC_THRESHOLD",
"Notifications": [
{
"TypeName": "MICROSOFT_TEAMS",
"DelayMin": "0",
"MicrosoftTeamsWebhookUrl": {
"Ref": "MicrosoftTeamsWebhookUrl"
},
"IntervalMin": "15"
}
],
"MetricThreshold": {
"MetricName": "NORMALIZED_SYSTEM_CPU_USER",
"Operator": "GREATER_THAN",
"Threshold": 5,
"Units": "RAW",
"Mode": "AVERAGE"
},
"Matchers": [
{
"FieldName": "TYPE_NAME",
"Operator": "EQUALS",
"Value": "STANDALONE"
}
]
}
}
},
"Outputs": {
"AlertConfiguration": {
"Description": "AlertConfiguration object",
"Value": {
"Ref": "AlertConfiguration"
}
},
"Id": {
"Value": {
"Fn::GetAtt": [
"AlertConfiguration",
"Id"
]
}
},
"Created": {
"Value": {
"Fn::GetAtt": [
"AlertConfiguration",
"Created"
]
}
},
"Enabled": {
"Value": {
"Fn::GetAtt": [
"AlertConfiguration",
"Enabled"
]
}
}
}
}
Loading