Get started with Pulumi in a free one hour introductory workshop. Register Now

GetAlertConfiguration

mongodbatlas.AlertConfiguration describes an Alert Configuration.

NOTE: Groups and projects are synonymous terms. You may find group_id in the official documentation.

Example Usage

Coming soon!

Coming soon!

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as mongodbatlas from "@pulumi/mongodbatlas";

const testMongodbatlasAlertConfiguration = new mongodbatlas.AlertConfiguration("test", {
    enabled: true,
    eventType: "OUTSIDE_METRIC_THRESHOLD",
    matchers: [{
        fieldName: "HOSTNAME_AND_PORT",
        operator: "EQUALS",
        value: "SECONDARY",
    }],
    metricThreshold: {
        metric_name: "ASSERT_REGULAR",
        mode: "AVERAGE",
        operator: "LESS_THAN",
        threshold: 99,
        units: "RAW",
    },
    notifications: [{
        delayMin: 0,
        emailEnabled: true,
        intervalMin: 5,
        smsEnabled: false,
        typeName: "GROUP",
    }],
    projectId: "<PROJECT-ID>",
});
const testAlertConfiguration = pulumi.all([testMongodbatlasAlertConfiguration.alertConfigurationId, testMongodbatlasAlertConfiguration.projectId]).apply(([alertConfigurationId, projectId]) => mongodbatlas.getAlertConfiguration({
    alertConfigurationId: alertConfigurationId,
    projectId: projectId,
}, { async: true }));

Using GetAlertConfiguration

function getAlertConfiguration(args: GetAlertConfigurationArgs, opts?: InvokeOptions): Promise<GetAlertConfigurationResult>
def get_alert_configuration(alert_configuration_id: Optional[str] = None, project_id: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetAlertConfigurationResult
func LookupAlertConfiguration(ctx *Context, args *LookupAlertConfigurationArgs, opts ...InvokeOption) (*LookupAlertConfigurationResult, error)

Note: This function is named LookupAlertConfiguration in the Go SDK.

public static class GetAlertConfiguration {
    public static Task<GetAlertConfigurationResult> InvokeAsync(GetAlertConfigurationArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

AlertConfigurationId string

Unique identifier for the alert configuration.

ProjectId string

The ID of the project where the alert configuration will create.

AlertConfigurationId string

Unique identifier for the alert configuration.

ProjectId string

The ID of the project where the alert configuration will create.

alertConfigurationId string

Unique identifier for the alert configuration.

projectId string

The ID of the project where the alert configuration will create.

alert_configuration_id str

Unique identifier for the alert configuration.

project_id str

The ID of the project where the alert configuration will create.

GetAlertConfiguration Result

The following output properties are available:

AlertConfigurationId string
Created string

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.

Enabled bool

If set to true, the alert configuration is enabled. If enabled is not exported it is set to false.

EventType string

The type of event that will trigger an alert.

Id string

The provider-assigned unique ID for this managed resource.

Matchers List<GetAlertConfigurationMatcher>
MetricThreshold GetAlertConfigurationMetricThreshold
Notifications List<GetAlertConfigurationNotification>
ProjectId string
Threshold GetAlertConfigurationThreshold

Threshold value outside of which an alert will be triggered.

Updated string

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.

AlertConfigurationId string
Created string

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.

Enabled bool

If set to true, the alert configuration is enabled. If enabled is not exported it is set to false.

EventType string

The type of event that will trigger an alert.

Id string

The provider-assigned unique ID for this managed resource.

Matchers []GetAlertConfigurationMatcher
MetricThreshold GetAlertConfigurationMetricThreshold
Notifications []GetAlertConfigurationNotification
ProjectId string
Threshold GetAlertConfigurationThreshold

Threshold value outside of which an alert will be triggered.

Updated string

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.

alertConfigurationId string
created string

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.

enabled boolean

If set to true, the alert configuration is enabled. If enabled is not exported it is set to false.

eventType string

The type of event that will trigger an alert.

id string

The provider-assigned unique ID for this managed resource.

matchers GetAlertConfigurationMatcher[]
metricThreshold GetAlertConfigurationMetricThreshold
notifications GetAlertConfigurationNotification[]
projectId string
threshold GetAlertConfigurationThreshold

Threshold value outside of which an alert will be triggered.

updated string

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.

alert_configuration_id str
created str

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was created.

enabled bool

If set to true, the alert configuration is enabled. If enabled is not exported it is set to false.

event_type str

The type of event that will trigger an alert.

id str

The provider-assigned unique ID for this managed resource.

matchers Sequence[GetAlertConfigurationMatcher]
metric_threshold GetAlertConfigurationMetricThreshold
notifications Sequence[GetAlertConfigurationNotification]
project_id str
threshold GetAlertConfigurationThreshold

Threshold value outside of which an alert will be triggered.

updated str

Timestamp in ISO 8601 date and time format in UTC when this alert configuration was last updated.

Supporting Types

GetAlertConfigurationMatcher

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

FieldName string

Name of the field in the target object to match on.

Operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

Value string

Value to test with the specified operator. If field_name is set to TYPE_NAME, you can match on the following values: - PRIMARY - SECONDARY - STANDALONE - CONFIG - MONGOS

FieldName string

Name of the field in the target object to match on.

Operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

Value string

Value to test with the specified operator. If field_name is set to TYPE_NAME, you can match on the following values: - PRIMARY - SECONDARY - STANDALONE - CONFIG - MONGOS

fieldName string

Name of the field in the target object to match on.

operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

value string

Value to test with the specified operator. If field_name is set to TYPE_NAME, you can match on the following values: - PRIMARY - SECONDARY - STANDALONE - CONFIG - MONGOS

field_name str

Name of the field in the target object to match on.

operator str

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

value str

Value to test with the specified operator. If field_name is set to TYPE_NAME, you can match on the following values: - PRIMARY - SECONDARY - STANDALONE - CONFIG - MONGOS

GetAlertConfigurationMetricThreshold

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

MetricName string

Name of the metric to check. The full list of current options is available here

Mode string

This must be set to AVERAGE. Atlas computes the current metric value as an average.

Operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

Threshold double

Threshold value outside of which an alert will be triggered.

Units string

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

MetricName string

Name of the metric to check. The full list of current options is available here

Mode string

This must be set to AVERAGE. Atlas computes the current metric value as an average.

Operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

Threshold float64

Threshold value outside of which an alert will be triggered.

Units string

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

metricName string

Name of the metric to check. The full list of current options is available here

mode string

This must be set to AVERAGE. Atlas computes the current metric value as an average.

operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

threshold number

Threshold value outside of which an alert will be triggered.

units string

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

metric_name str

Name of the metric to check. The full list of current options is available here

mode str

This must be set to AVERAGE. Atlas computes the current metric value as an average.

operator str

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

threshold float

Threshold value outside of which an alert will be triggered.

units str

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

GetAlertConfigurationNotification

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

ApiToken string

Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

ChannelName string

Slack channel name. Required for the SLACK notifications type.

DatadogApiKey string

Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.

DatadogRegion string

Region that indicates which API URL to use. Accepted regions are: US, EU. The default Datadog region is US.

DelayMin int

Number of minutes to wait after an alert condition is detected before sending out the first notification.

EmailAddress string

Email address to which alert notifications are sent. Required for the EMAIL notifications type.

EmailEnabled bool

Flag indicating if email notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

FlowName string

Flowdock flow name in lower-case letters. Required for the FLOWDOCK notifications type

FlowdockApiToken string

The Flowdock personal API token. Required for the FLOWDOCK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

IntervalMin int

Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5.

MobileNumber string

Mobile number to which alert notifications are sent. Required for the SMS notifications type.

OpsGenieApiKey string

Opsgenie API Key. Required for the OPS_GENIE notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

OpsGenieRegion string

Region that indicates which API URL to use. Accepted regions are: US ,EU. The default Opsgenie region is US.

OrgName string

Flowdock organization name in lower-case letters. This is the name that appears after www.flowdock.com/app/ in the URL string. Required for the FLOWDOCK notifications type.

ServiceKey string

PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

SmsEnabled bool

Flag indicating if text message notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

TeamId string

Unique identifier of a team.

TypeName string

Type of alert notification. Accepted values are: - DATADOG - EMAIL - FLOWDOCK - GROUP (Project) - OPS_GENIE - ORG - PAGER_DUTY - SLACK - SMS - TEAM - USER - VICTOR_OPS - WEBHOOK

Username string

Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the USER notifications type.

VictorOpsApiKey string

VictorOps API key. Required for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

VictorOpsRoutingKey string

VictorOps routing key. Optional for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

Roles List<string>
ApiToken string

Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

ChannelName string

Slack channel name. Required for the SLACK notifications type.

DatadogApiKey string

Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.

DatadogRegion string

Region that indicates which API URL to use. Accepted regions are: US, EU. The default Datadog region is US.

DelayMin int

Number of minutes to wait after an alert condition is detected before sending out the first notification.

EmailAddress string

Email address to which alert notifications are sent. Required for the EMAIL notifications type.

EmailEnabled bool

Flag indicating if email notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

FlowName string

Flowdock flow name in lower-case letters. Required for the FLOWDOCK notifications type

FlowdockApiToken string

The Flowdock personal API token. Required for the FLOWDOCK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

IntervalMin int

Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5.

MobileNumber string

Mobile number to which alert notifications are sent. Required for the SMS notifications type.

OpsGenieApiKey string

Opsgenie API Key. Required for the OPS_GENIE notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

OpsGenieRegion string

Region that indicates which API URL to use. Accepted regions are: US ,EU. The default Opsgenie region is US.

OrgName string

Flowdock organization name in lower-case letters. This is the name that appears after www.flowdock.com/app/ in the URL string. Required for the FLOWDOCK notifications type.

ServiceKey string

PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

SmsEnabled bool

Flag indicating if text message notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

TeamId string

Unique identifier of a team.

TypeName string

Type of alert notification. Accepted values are: - DATADOG - EMAIL - FLOWDOCK - GROUP (Project) - OPS_GENIE - ORG - PAGER_DUTY - SLACK - SMS - TEAM - USER - VICTOR_OPS - WEBHOOK

Username string

Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the USER notifications type.

VictorOpsApiKey string

VictorOps API key. Required for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

VictorOpsRoutingKey string

VictorOps routing key. Optional for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

Roles []string
apiToken string

Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

channelName string

Slack channel name. Required for the SLACK notifications type.

datadogApiKey string

Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.

datadogRegion string

Region that indicates which API URL to use. Accepted regions are: US, EU. The default Datadog region is US.

delayMin number

Number of minutes to wait after an alert condition is detected before sending out the first notification.

emailAddress string

Email address to which alert notifications are sent. Required for the EMAIL notifications type.

emailEnabled boolean

Flag indicating if email notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

flowName string

Flowdock flow name in lower-case letters. Required for the FLOWDOCK notifications type

flowdockApiToken string

The Flowdock personal API token. Required for the FLOWDOCK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

intervalMin number

Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5.

mobileNumber string

Mobile number to which alert notifications are sent. Required for the SMS notifications type.

opsGenieApiKey string

Opsgenie API Key. Required for the OPS_GENIE notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

opsGenieRegion string

Region that indicates which API URL to use. Accepted regions are: US ,EU. The default Opsgenie region is US.

orgName string

Flowdock organization name in lower-case letters. This is the name that appears after www.flowdock.com/app/ in the URL string. Required for the FLOWDOCK notifications type.

serviceKey string

PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

smsEnabled boolean

Flag indicating if text message notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

teamId string

Unique identifier of a team.

typeName string

Type of alert notification. Accepted values are: - DATADOG - EMAIL - FLOWDOCK - GROUP (Project) - OPS_GENIE - ORG - PAGER_DUTY - SLACK - SMS - TEAM - USER - VICTOR_OPS - WEBHOOK

username string

Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the USER notifications type.

victorOpsApiKey string

VictorOps API key. Required for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

victorOpsRoutingKey string

VictorOps routing key. Optional for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

roles string[]
api_token str

Slack API token. Required for the SLACK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

channel_name str

Slack channel name. Required for the SLACK notifications type.

datadog_api_key str

Datadog API Key. Found in the Datadog dashboard. Required for the DATADOG notifications type.

datadog_region str

Region that indicates which API URL to use. Accepted regions are: US, EU. The default Datadog region is US.

delay_min int

Number of minutes to wait after an alert condition is detected before sending out the first notification.

email_address str

Email address to which alert notifications are sent. Required for the EMAIL notifications type.

email_enabled bool

Flag indicating if email notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

flow_name str

Flowdock flow name in lower-case letters. Required for the FLOWDOCK notifications type

flowdock_api_token str

The Flowdock personal API token. Required for the FLOWDOCK notifications type. If the token later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

interval_min int

Number of minutes to wait between successive notifications for unacknowledged alerts that are not resolved. The minimum value is 5.

mobile_number str

Mobile number to which alert notifications are sent. Required for the SMS notifications type.

ops_genie_api_key str

Opsgenie API Key. Required for the OPS_GENIE notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the token.

ops_genie_region str

Region that indicates which API URL to use. Accepted regions are: US ,EU. The default Opsgenie region is US.

org_name str

Flowdock organization name in lower-case letters. This is the name that appears after www.flowdock.com/app/ in the URL string. Required for the FLOWDOCK notifications type.

service_key str

PagerDuty service key. Required for the PAGER_DUTY notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

sms_enabled bool

Flag indicating if text message notifications should be sent. Configurable for ORG, GROUP, and USER notifications types.

team_id str

Unique identifier of a team.

type_name str

Type of alert notification. Accepted values are: - DATADOG - EMAIL - FLOWDOCK - GROUP (Project) - OPS_GENIE - ORG - PAGER_DUTY - SLACK - SMS - TEAM - USER - VICTOR_OPS - WEBHOOK

username str

Name of the Atlas user to which to send notifications. Only a user in the project that owns the alert configuration is allowed here. Required for the USER notifications type.

victor_ops_api_key str

VictorOps API key. Required for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

victor_ops_routing_key str

VictorOps routing key. Optional for the VICTOR_OPS notifications type. If the key later becomes invalid, Atlas sends an email to the project owner and eventually removes the key.

roles Sequence[str]

GetAlertConfigurationThreshold

See the output API doc for this type.

See the output API doc for this type.

See the output API doc for this type.

Operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

Threshold double

Threshold value outside of which an alert will be triggered.

Units string

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

Operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

Threshold float64

Threshold value outside of which an alert will be triggered.

Units string

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

operator string

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

threshold number

Threshold value outside of which an alert will be triggered.

units string

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

operator str

Operator to apply when checking the current metric value against the threshold value. Accepted values are: - GREATER_THAN - LESS_THAN

threshold float

Threshold value outside of which an alert will be triggered.

units str

The units for the threshold value. Depends on the type of metric. Accepted values are: - RAW - BITS - BYTES - KILOBITS - KILOBYTES - MEGABITS - MEGABYTES - GIGABITS - GIGABYTES - TERABYTES - PETABYTES - MILLISECONDS - SECONDS - MINUTES - HOURS - DAYS

Package Details

Repository
https://github.com/pulumi/pulumi-mongodbatlas
License
Apache-2.0
Notes
This Pulumi package is based on the mongodbatlas Terraform Provider.