1. Packages
  2. Datadog
  3. API Docs
  4. Monitor
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

datadog.Monitor

Explore with Pulumi AI

datadog logo
Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi

    Provides a Datadog monitor resource. This can be used to create and manage Datadog monitors.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Datadog = Pulumi.Datadog;
    
    return await Deployment.RunAsync(() => 
    {
        var foo = new Datadog.Monitor("foo", new()
        {
            EscalationMessage = "Escalation message @pagerduty",
            IncludeTags = true,
            Message = "Monitor triggered. Notify: @hipchat-channel",
            MonitorThresholds = new Datadog.Inputs.MonitorMonitorThresholdsArgs
            {
                Critical = "4",
                Warning = "2",
            },
            Name = "Name for monitor foo",
            Query = "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4",
            Tags = new[]
            {
                "foo:bar",
                "team:fooBar",
            },
            Type = "metric alert",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-datadog/sdk/v4/go/datadog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datadog.NewMonitor(ctx, "foo", &datadog.MonitorArgs{
    			EscalationMessage: pulumi.String("Escalation message @pagerduty"),
    			IncludeTags:       pulumi.Bool(true),
    			Message:           pulumi.String("Monitor triggered. Notify: @hipchat-channel"),
    			MonitorThresholds: &datadog.MonitorMonitorThresholdsArgs{
    				Critical: pulumi.String("4"),
    				Warning:  pulumi.String("2"),
    			},
    			Name:  pulumi.String("Name for monitor foo"),
    			Query: pulumi.String("avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4"),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo:bar"),
    				pulumi.String("team:fooBar"),
    			},
    			Type: pulumi.String("metric alert"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.datadog.Monitor;
    import com.pulumi.datadog.MonitorArgs;
    import com.pulumi.datadog.inputs.MonitorMonitorThresholdsArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var foo = new Monitor("foo", MonitorArgs.builder()        
                .escalationMessage("Escalation message @pagerduty")
                .includeTags(true)
                .message("Monitor triggered. Notify: @hipchat-channel")
                .monitorThresholds(MonitorMonitorThresholdsArgs.builder()
                    .critical(4)
                    .warning(2)
                    .build())
                .name("Name for monitor foo")
                .query("avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4")
                .tags(            
                    "foo:bar",
                    "team:fooBar")
                .type("metric alert")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_datadog as datadog
    
    foo = datadog.Monitor("foo",
        escalation_message="Escalation message @pagerduty",
        include_tags=True,
        message="Monitor triggered. Notify: @hipchat-channel",
        monitor_thresholds=datadog.MonitorMonitorThresholdsArgs(
            critical="4",
            warning="2",
        ),
        name="Name for monitor foo",
        query="avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4",
        tags=[
            "foo:bar",
            "team:fooBar",
        ],
        type="metric alert")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as datadog from "@pulumi/datadog";
    
    const foo = new datadog.Monitor("foo", {
        escalationMessage: "Escalation message @pagerduty",
        includeTags: true,
        message: "Monitor triggered. Notify: @hipchat-channel",
        monitorThresholds: {
            critical: "4",
            warning: "2",
        },
        name: "Name for monitor foo",
        query: "avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4",
        tags: [
            "foo:bar",
            "team:fooBar",
        ],
        type: "metric alert",
    });
    
    resources:
      foo:
        type: datadog:Monitor
        properties:
          escalationMessage: Escalation message @pagerduty
          includeTags: true
          message: 'Monitor triggered. Notify: @hipchat-channel'
          monitorThresholds:
            critical: 4
            warning: 2
          name: Name for monitor foo
          query: avg(last_1h):avg:aws.ec2.cpu{environment:foo,host:foo} by {host} > 4
          tags:
            - foo:bar
            - team:fooBar
          type: metric alert
    

    Create Monitor Resource

    new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);
    @overload
    def Monitor(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                enable_logs_sample: Optional[bool] = None,
                escalation_message: Optional[str] = None,
                evaluation_delay: Optional[int] = None,
                force_delete: Optional[bool] = None,
                group_retention_duration: Optional[str] = None,
                groupby_simple_monitor: Optional[bool] = None,
                include_tags: Optional[bool] = None,
                locked: Optional[bool] = None,
                message: Optional[str] = None,
                monitor_threshold_windows: Optional[MonitorMonitorThresholdWindowsArgs] = None,
                monitor_thresholds: Optional[MonitorMonitorThresholdsArgs] = None,
                name: Optional[str] = None,
                new_group_delay: Optional[int] = None,
                new_host_delay: Optional[int] = None,
                no_data_timeframe: Optional[int] = None,
                notification_preset_name: Optional[str] = None,
                notify_audit: Optional[bool] = None,
                notify_bies: Optional[Sequence[str]] = None,
                notify_no_data: Optional[bool] = None,
                on_missing_data: Optional[str] = None,
                priority: Optional[int] = None,
                query: Optional[str] = None,
                renotify_interval: Optional[int] = None,
                renotify_occurrences: Optional[int] = None,
                renotify_statuses: Optional[Sequence[str]] = None,
                require_full_window: Optional[bool] = None,
                restricted_roles: Optional[Sequence[str]] = None,
                scheduling_options: Optional[Sequence[MonitorSchedulingOptionArgs]] = None,
                tags: Optional[Sequence[str]] = None,
                timeout_h: Optional[int] = None,
                type: Optional[str] = None,
                validate: Optional[bool] = None,
                variables: Optional[MonitorVariablesArgs] = None)
    @overload
    def Monitor(resource_name: str,
                args: MonitorArgs,
                opts: Optional[ResourceOptions] = None)
    func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)
    public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
    public Monitor(String name, MonitorArgs args)
    public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
    
    type: datadog:Monitor
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Monitor Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Monitor resource accepts the following input properties:

    Message string

    A message to include with notifications for this monitor.

    Name string

    Name of Datadog monitor.

    Query string

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    Type string

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    EnableLogsSample bool

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    EscalationMessage string

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    EvaluationDelay int

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    ForceDelete bool

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    GroupRetentionDuration string

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    GroupbySimpleMonitor bool

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    IncludeTags bool

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    Locked bool

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    MonitorThresholdWindows MonitorMonitorThresholdWindows

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    MonitorThresholds MonitorMonitorThresholds

    Alert thresholds of the monitor.

    NewGroupDelay int

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    NewHostDelay int

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    NoDataTimeframe int

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    NotificationPresetName string

    Toggles the display of additional content sent in the monitor notification.

    NotifyAudit bool

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    NotifyBies List<string>

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    NotifyNoData bool

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    OnMissingData string

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    Priority int

    Integer from 1 (high) to 5 (low) indicating alert severity.

    RenotifyInterval int

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    RenotifyOccurrences int

    The number of re-notification messages that should be sent on the current status.

    RenotifyStatuses List<string>

    The types of statuses for which re-notification messages should be sent.

    RequireFullWindow bool

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    RestrictedRoles List<string>

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    SchedulingOptions List<MonitorSchedulingOption>

    Configuration options for scheduling.

    Tags List<string>

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    TimeoutH int

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    Validate bool

    If set to false, skip the validation call done during plan.

    Variables MonitorVariables
    Message string

    A message to include with notifications for this monitor.

    Name string

    Name of Datadog monitor.

    Query string

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    Type string

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    EnableLogsSample bool

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    EscalationMessage string

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    EvaluationDelay int

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    ForceDelete bool

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    GroupRetentionDuration string

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    GroupbySimpleMonitor bool

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    IncludeTags bool

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    Locked bool

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    MonitorThresholdWindows MonitorMonitorThresholdWindowsArgs

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    MonitorThresholds MonitorMonitorThresholdsArgs

    Alert thresholds of the monitor.

    NewGroupDelay int

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    NewHostDelay int

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    NoDataTimeframe int

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    NotificationPresetName string

    Toggles the display of additional content sent in the monitor notification.

    NotifyAudit bool

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    NotifyBies []string

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    NotifyNoData bool

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    OnMissingData string

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    Priority int

    Integer from 1 (high) to 5 (low) indicating alert severity.

    RenotifyInterval int

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    RenotifyOccurrences int

    The number of re-notification messages that should be sent on the current status.

    RenotifyStatuses []string

    The types of statuses for which re-notification messages should be sent.

    RequireFullWindow bool

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    RestrictedRoles []string

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    SchedulingOptions []MonitorSchedulingOptionArgs

    Configuration options for scheduling.

    Tags []string

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    TimeoutH int

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    Validate bool

    If set to false, skip the validation call done during plan.

    Variables MonitorVariablesArgs
    message String

    A message to include with notifications for this monitor.

    name String

    Name of Datadog monitor.

    query String

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    type String

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    enableLogsSample Boolean

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    escalationMessage String

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluationDelay Integer

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    forceDelete Boolean

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    groupRetentionDuration String

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupbySimpleMonitor Boolean

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    includeTags Boolean

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked Boolean

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    monitorThresholdWindows MonitorMonitorThresholdWindows

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitorThresholds MonitorMonitorThresholds

    Alert thresholds of the monitor.

    newGroupDelay Integer

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    newHostDelay Integer

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    noDataTimeframe Integer

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notificationPresetName String

    Toggles the display of additional content sent in the monitor notification.

    notifyAudit Boolean

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notifyBies List<String>

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notifyNoData Boolean

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    onMissingData String

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority Integer

    Integer from 1 (high) to 5 (low) indicating alert severity.

    renotifyInterval Integer

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotifyOccurrences Integer

    The number of re-notification messages that should be sent on the current status.

    renotifyStatuses List<String>

    The types of statuses for which re-notification messages should be sent.

    requireFullWindow Boolean

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restrictedRoles List<String>

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    schedulingOptions List<MonitorSchedulingOption>

    Configuration options for scheduling.

    tags List<String>

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeoutH Integer

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    validate Boolean

    If set to false, skip the validation call done during plan.

    variables MonitorVariables
    message string

    A message to include with notifications for this monitor.

    name string

    Name of Datadog monitor.

    query string

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    type string

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    enableLogsSample boolean

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    escalationMessage string

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluationDelay number

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    forceDelete boolean

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    groupRetentionDuration string

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupbySimpleMonitor boolean

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    includeTags boolean

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked boolean

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    monitorThresholdWindows MonitorMonitorThresholdWindows

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitorThresholds MonitorMonitorThresholds

    Alert thresholds of the monitor.

    newGroupDelay number

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    newHostDelay number

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    noDataTimeframe number

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notificationPresetName string

    Toggles the display of additional content sent in the monitor notification.

    notifyAudit boolean

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notifyBies string[]

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notifyNoData boolean

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    onMissingData string

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority number

    Integer from 1 (high) to 5 (low) indicating alert severity.

    renotifyInterval number

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotifyOccurrences number

    The number of re-notification messages that should be sent on the current status.

    renotifyStatuses string[]

    The types of statuses for which re-notification messages should be sent.

    requireFullWindow boolean

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restrictedRoles string[]

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    schedulingOptions MonitorSchedulingOption[]

    Configuration options for scheduling.

    tags string[]

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeoutH number

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    validate boolean

    If set to false, skip the validation call done during plan.

    variables MonitorVariables
    message str

    A message to include with notifications for this monitor.

    name str

    Name of Datadog monitor.

    query str

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    type str

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    enable_logs_sample bool

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    escalation_message str

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluation_delay int

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    force_delete bool

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    group_retention_duration str

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupby_simple_monitor bool

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    include_tags bool

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked bool

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    monitor_threshold_windows MonitorMonitorThresholdWindowsArgs

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitor_thresholds MonitorMonitorThresholdsArgs

    Alert thresholds of the monitor.

    new_group_delay int

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    new_host_delay int

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    no_data_timeframe int

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notification_preset_name str

    Toggles the display of additional content sent in the monitor notification.

    notify_audit bool

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notify_bies Sequence[str]

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notify_no_data bool

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    on_missing_data str

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority int

    Integer from 1 (high) to 5 (low) indicating alert severity.

    renotify_interval int

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotify_occurrences int

    The number of re-notification messages that should be sent on the current status.

    renotify_statuses Sequence[str]

    The types of statuses for which re-notification messages should be sent.

    require_full_window bool

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restricted_roles Sequence[str]

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    scheduling_options Sequence[MonitorSchedulingOptionArgs]

    Configuration options for scheduling.

    tags Sequence[str]

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeout_h int

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    validate bool

    If set to false, skip the validation call done during plan.

    variables MonitorVariablesArgs
    message String

    A message to include with notifications for this monitor.

    name String

    Name of Datadog monitor.

    query String

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    type String

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    enableLogsSample Boolean

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    escalationMessage String

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluationDelay Number

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    forceDelete Boolean

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    groupRetentionDuration String

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupbySimpleMonitor Boolean

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    includeTags Boolean

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked Boolean

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    monitorThresholdWindows Property Map

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitorThresholds Property Map

    Alert thresholds of the monitor.

    newGroupDelay Number

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    newHostDelay Number

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    noDataTimeframe Number

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notificationPresetName String

    Toggles the display of additional content sent in the monitor notification.

    notifyAudit Boolean

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notifyBies List<String>

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notifyNoData Boolean

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    onMissingData String

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority Number

    Integer from 1 (high) to 5 (low) indicating alert severity.

    renotifyInterval Number

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotifyOccurrences Number

    The number of re-notification messages that should be sent on the current status.

    renotifyStatuses List<String>

    The types of statuses for which re-notification messages should be sent.

    requireFullWindow Boolean

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restrictedRoles List<String>

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    schedulingOptions List<Property Map>

    Configuration options for scheduling.

    tags List<String>

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeoutH Number

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    validate Boolean

    If set to false, skip the validation call done during plan.

    variables Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Monitor resource produces the following output properties:

    EnableSamples bool

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    Id string

    The provider-assigned unique ID for this managed resource.

    EnableSamples bool

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    Id string

    The provider-assigned unique ID for this managed resource.

    enableSamples Boolean

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    id String

    The provider-assigned unique ID for this managed resource.

    enableSamples boolean

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    id string

    The provider-assigned unique ID for this managed resource.

    enable_samples bool

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    id str

    The provider-assigned unique ID for this managed resource.

    enableSamples Boolean

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing Monitor Resource

    Get an existing Monitor resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: MonitorState, opts?: CustomResourceOptions): Monitor
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enable_logs_sample: Optional[bool] = None,
            enable_samples: Optional[bool] = None,
            escalation_message: Optional[str] = None,
            evaluation_delay: Optional[int] = None,
            force_delete: Optional[bool] = None,
            group_retention_duration: Optional[str] = None,
            groupby_simple_monitor: Optional[bool] = None,
            include_tags: Optional[bool] = None,
            locked: Optional[bool] = None,
            message: Optional[str] = None,
            monitor_threshold_windows: Optional[MonitorMonitorThresholdWindowsArgs] = None,
            monitor_thresholds: Optional[MonitorMonitorThresholdsArgs] = None,
            name: Optional[str] = None,
            new_group_delay: Optional[int] = None,
            new_host_delay: Optional[int] = None,
            no_data_timeframe: Optional[int] = None,
            notification_preset_name: Optional[str] = None,
            notify_audit: Optional[bool] = None,
            notify_bies: Optional[Sequence[str]] = None,
            notify_no_data: Optional[bool] = None,
            on_missing_data: Optional[str] = None,
            priority: Optional[int] = None,
            query: Optional[str] = None,
            renotify_interval: Optional[int] = None,
            renotify_occurrences: Optional[int] = None,
            renotify_statuses: Optional[Sequence[str]] = None,
            require_full_window: Optional[bool] = None,
            restricted_roles: Optional[Sequence[str]] = None,
            scheduling_options: Optional[Sequence[MonitorSchedulingOptionArgs]] = None,
            tags: Optional[Sequence[str]] = None,
            timeout_h: Optional[int] = None,
            type: Optional[str] = None,
            validate: Optional[bool] = None,
            variables: Optional[MonitorVariablesArgs] = None) -> Monitor
    func GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)
    public static Monitor Get(string name, Input<string> id, MonitorState? state, CustomResourceOptions? opts = null)
    public static Monitor get(String name, Output<String> id, MonitorState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    EnableLogsSample bool

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    EnableSamples bool

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    EscalationMessage string

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    EvaluationDelay int

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    ForceDelete bool

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    GroupRetentionDuration string

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    GroupbySimpleMonitor bool

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    IncludeTags bool

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    Locked bool

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    Message string

    A message to include with notifications for this monitor.

    MonitorThresholdWindows MonitorMonitorThresholdWindows

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    MonitorThresholds MonitorMonitorThresholds

    Alert thresholds of the monitor.

    Name string

    Name of Datadog monitor.

    NewGroupDelay int

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    NewHostDelay int

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    NoDataTimeframe int

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    NotificationPresetName string

    Toggles the display of additional content sent in the monitor notification.

    NotifyAudit bool

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    NotifyBies List<string>

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    NotifyNoData bool

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    OnMissingData string

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    Priority int

    Integer from 1 (high) to 5 (low) indicating alert severity.

    Query string

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    RenotifyInterval int

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    RenotifyOccurrences int

    The number of re-notification messages that should be sent on the current status.

    RenotifyStatuses List<string>

    The types of statuses for which re-notification messages should be sent.

    RequireFullWindow bool

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    RestrictedRoles List<string>

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    SchedulingOptions List<MonitorSchedulingOption>

    Configuration options for scheduling.

    Tags List<string>

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    TimeoutH int

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    Type string

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    Validate bool

    If set to false, skip the validation call done during plan.

    Variables MonitorVariables
    EnableLogsSample bool

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    EnableSamples bool

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    EscalationMessage string

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    EvaluationDelay int

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    ForceDelete bool

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    GroupRetentionDuration string

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    GroupbySimpleMonitor bool

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    IncludeTags bool

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    Locked bool

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    Message string

    A message to include with notifications for this monitor.

    MonitorThresholdWindows MonitorMonitorThresholdWindowsArgs

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    MonitorThresholds MonitorMonitorThresholdsArgs

    Alert thresholds of the monitor.

    Name string

    Name of Datadog monitor.

    NewGroupDelay int

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    NewHostDelay int

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    NoDataTimeframe int

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    NotificationPresetName string

    Toggles the display of additional content sent in the monitor notification.

    NotifyAudit bool

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    NotifyBies []string

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    NotifyNoData bool

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    OnMissingData string

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    Priority int

    Integer from 1 (high) to 5 (low) indicating alert severity.

    Query string

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    RenotifyInterval int

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    RenotifyOccurrences int

    The number of re-notification messages that should be sent on the current status.

    RenotifyStatuses []string

    The types of statuses for which re-notification messages should be sent.

    RequireFullWindow bool

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    RestrictedRoles []string

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    SchedulingOptions []MonitorSchedulingOptionArgs

    Configuration options for scheduling.

    Tags []string

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    TimeoutH int

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    Type string

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    Validate bool

    If set to false, skip the validation call done during plan.

    Variables MonitorVariablesArgs
    enableLogsSample Boolean

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    enableSamples Boolean

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    escalationMessage String

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluationDelay Integer

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    forceDelete Boolean

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    groupRetentionDuration String

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupbySimpleMonitor Boolean

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    includeTags Boolean

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked Boolean

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    message String

    A message to include with notifications for this monitor.

    monitorThresholdWindows MonitorMonitorThresholdWindows

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitorThresholds MonitorMonitorThresholds

    Alert thresholds of the monitor.

    name String

    Name of Datadog monitor.

    newGroupDelay Integer

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    newHostDelay Integer

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    noDataTimeframe Integer

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notificationPresetName String

    Toggles the display of additional content sent in the monitor notification.

    notifyAudit Boolean

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notifyBies List<String>

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notifyNoData Boolean

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    onMissingData String

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority Integer

    Integer from 1 (high) to 5 (low) indicating alert severity.

    query String

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    renotifyInterval Integer

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotifyOccurrences Integer

    The number of re-notification messages that should be sent on the current status.

    renotifyStatuses List<String>

    The types of statuses for which re-notification messages should be sent.

    requireFullWindow Boolean

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restrictedRoles List<String>

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    schedulingOptions List<MonitorSchedulingOption>

    Configuration options for scheduling.

    tags List<String>

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeoutH Integer

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    type String

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    validate Boolean

    If set to false, skip the validation call done during plan.

    variables MonitorVariables
    enableLogsSample boolean

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    enableSamples boolean

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    escalationMessage string

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluationDelay number

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    forceDelete boolean

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    groupRetentionDuration string

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupbySimpleMonitor boolean

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    includeTags boolean

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked boolean

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    message string

    A message to include with notifications for this monitor.

    monitorThresholdWindows MonitorMonitorThresholdWindows

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitorThresholds MonitorMonitorThresholds

    Alert thresholds of the monitor.

    name string

    Name of Datadog monitor.

    newGroupDelay number

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    newHostDelay number

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    noDataTimeframe number

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notificationPresetName string

    Toggles the display of additional content sent in the monitor notification.

    notifyAudit boolean

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notifyBies string[]

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notifyNoData boolean

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    onMissingData string

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority number

    Integer from 1 (high) to 5 (low) indicating alert severity.

    query string

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    renotifyInterval number

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotifyOccurrences number

    The number of re-notification messages that should be sent on the current status.

    renotifyStatuses string[]

    The types of statuses for which re-notification messages should be sent.

    requireFullWindow boolean

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restrictedRoles string[]

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    schedulingOptions MonitorSchedulingOption[]

    Configuration options for scheduling.

    tags string[]

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeoutH number

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    type string

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    validate boolean

    If set to false, skip the validation call done during plan.

    variables MonitorVariables
    enable_logs_sample bool

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    enable_samples bool

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    escalation_message str

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluation_delay int

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    force_delete bool

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    group_retention_duration str

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupby_simple_monitor bool

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    include_tags bool

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked bool

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    message str

    A message to include with notifications for this monitor.

    monitor_threshold_windows MonitorMonitorThresholdWindowsArgs

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitor_thresholds MonitorMonitorThresholdsArgs

    Alert thresholds of the monitor.

    name str

    Name of Datadog monitor.

    new_group_delay int

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    new_host_delay int

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    no_data_timeframe int

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notification_preset_name str

    Toggles the display of additional content sent in the monitor notification.

    notify_audit bool

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notify_bies Sequence[str]

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notify_no_data bool

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    on_missing_data str

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority int

    Integer from 1 (high) to 5 (low) indicating alert severity.

    query str

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    renotify_interval int

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotify_occurrences int

    The number of re-notification messages that should be sent on the current status.

    renotify_statuses Sequence[str]

    The types of statuses for which re-notification messages should be sent.

    require_full_window bool

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restricted_roles Sequence[str]

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    scheduling_options Sequence[MonitorSchedulingOptionArgs]

    Configuration options for scheduling.

    tags Sequence[str]

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeout_h int

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    type str

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    validate bool

    If set to false, skip the validation call done during plan.

    variables MonitorVariablesArgs
    enableLogsSample Boolean

    A boolean indicating whether or not to include a list of log values which triggered the alert. This is only used by log monitors. Defaults to false.

    enableSamples Boolean

    Whether or not a list of samples which triggered the alert is included. This is only used by CI Test and Pipeline monitors.

    escalationMessage String

    A message to include with a re-notification. Supports the @username notification allowed elsewhere.

    evaluationDelay Number

    (Only applies to metric alert) Time (in seconds) to delay evaluation, as a non-negative integer. For example, if the value is set to 300 (5min), the timeframe is set to last_5m and the time is 7:00, the monitor will evaluate data from 6:50 to 6:55. This is useful for AWS CloudWatch and other backfilled metrics to ensure the monitor will always have data during evaluation.

    forceDelete Boolean

    A boolean indicating whether this monitor can be deleted even if it’s referenced by other resources (e.g. SLO, composite monitor).

    groupRetentionDuration String

    The time span after which groups with missing data are dropped from the monitor state. The minimum value is one hour, and the maximum value is 72 hours. Example values are: 60m, 1h, and 2d. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors.

    groupbySimpleMonitor Boolean

    Whether or not to trigger one alert if any source breaches a threshold. This is only used by log monitors. Defaults to false.

    includeTags Boolean

    A boolean indicating whether notifications from this monitor automatically insert its triggering tags into the title. Defaults to true.

    locked Boolean

    A boolean indicating whether changes to this monitor should be restricted to the creator or admins. Defaults to false.

    Deprecated:

    Use restricted_roles.

    message String

    A message to include with notifications for this monitor.

    monitorThresholdWindows Property Map

    A mapping containing recovery_window and trigger_window values, e.g. last_15m . Can only be used for, and are required for, anomaly monitors.

    monitorThresholds Property Map

    Alert thresholds of the monitor.

    name String

    Name of Datadog monitor.

    newGroupDelay Number

    The time (in seconds) to skip evaluations for new groups. new_group_delay overrides new_host_delay if it is set to a nonzero value.

    newHostDelay Number

    Deprecated. See new_group_delay. Time (in seconds) to allow a host to boot and applications to fully start before starting the evaluation of monitor results. Should be a non-negative integer. This value is ignored for simple monitors and monitors not grouped by host. Defaults to 300. The only case when this should be used is to override the default and set new_host_delay to zero for monitors grouped by host.

    Deprecated:

    Use new_group_delay except when setting new_host_delay to zero.

    noDataTimeframe Number

    The number of minutes before a monitor will notify when data stops reporting. Provider defaults to 10 minutes. We recommend at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks.

    notificationPresetName String

    Toggles the display of additional content sent in the monitor notification.

    notifyAudit Boolean

    A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.

    notifyBies List<String>

    Controls what granularity a monitor alerts on. Only available for monitors with groupings. For instance, a monitor grouped by cluster, namespace, and pod can be configured to only notify on each new cluster violating the alert conditions by setting notify_by to ['cluster']. Tags mentioned in notify_by must be a subset of the grouping tags in the query. For example, a query grouped by cluster and namespace cannot notify on region. Setting notify_by to [*] configures the monitor to notify as a simple-alert.

    notifyNoData Boolean

    A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.

    onMissingData String

    Controls how groups or monitors are treated if an evaluation does not return any data points. The default option results in different behavior depending on the monitor query type. For monitors using Count queries, an empty monitor evaluation is treated as 0 and is compared to the threshold conditions. For monitors using any query type other than Count, for example Gauge, Measure, or Rate, the monitor shows the last known status. This option is only available for APM Trace Analytics, Audit Trail, CI, Error Tracking, Event, Logs, and RUM monitors. Valid values are: show_no_data, show_and_notify_no_data, resolve, and default.

    priority Number

    Integer from 1 (high) to 5 (low) indicating alert severity.

    query String

    The monitor query to notify on. Note this is not the same query you see in the UI and the syntax is different depending on the monitor type, please see the API Reference for details. terraform plan will validate query contents unless validate is set to false. Note: APM latency data is now available as Distribution Metrics. Existing monitors have been migrated automatically but all terraformed monitors can still use the existing metrics. We strongly recommend updating monitor definitions to query the new metrics. To learn more, or to see examples of how to update your terraform definitions to utilize the new distribution metrics, see the detailed doc.

    renotifyInterval Number

    The number of minutes after the last notification before a monitor will re-notify on the current status. It will only re-notify if it's not resolved.

    renotifyOccurrences Number

    The number of re-notification messages that should be sent on the current status.

    renotifyStatuses List<String>

    The types of statuses for which re-notification messages should be sent.

    requireFullWindow Boolean

    A boolean indicating whether this monitor needs a full window of data before it's evaluated. We highly recommend you set this to false for sparse metrics, otherwise some evaluations will be skipped. Default: true for on average, at all times and in total aggregation. false otherwise.

    restrictedRoles List<String>

    A list of unique role identifiers to define which roles are allowed to edit the monitor. Editing a monitor includes any updates to the monitor configuration, monitor deletion, and muting of the monitor for any amount of time. Roles unique identifiers can be pulled from the Roles API in the data.id field.

    schedulingOptions List<Property Map>

    Configuration options for scheduling.

    tags List<String>

    A list of tags to associate with your monitor. This can help you categorize and filter monitors in the manage monitors page of the UI. Note: it's not currently possible to filter by these tags when querying via the API

    timeoutH Number

    The number of hours of the monitor not reporting data before it automatically resolves from a triggered state. The minimum allowed value is 0 hours. The maximum allowed value is 24 hours.

    type String

    The type of the monitor. The mapping from these types to the types found in the Datadog Web UI can be found in the Datadog API documentation page. Note: The monitor type cannot be changed after a monitor is created.

    validate Boolean

    If set to false, skip the validation call done during plan.

    variables Property Map

    Supporting Types

    MonitorMonitorThresholdWindows, MonitorMonitorThresholdWindowsArgs

    RecoveryWindow string

    Describes how long an anomalous metric must be normal before the alert recovers.

    TriggerWindow string

    Describes how long a metric must be anomalous before an alert triggers.

    RecoveryWindow string

    Describes how long an anomalous metric must be normal before the alert recovers.

    TriggerWindow string

    Describes how long a metric must be anomalous before an alert triggers.

    recoveryWindow String

    Describes how long an anomalous metric must be normal before the alert recovers.

    triggerWindow String

    Describes how long a metric must be anomalous before an alert triggers.

    recoveryWindow string

    Describes how long an anomalous metric must be normal before the alert recovers.

    triggerWindow string

    Describes how long a metric must be anomalous before an alert triggers.

    recovery_window str

    Describes how long an anomalous metric must be normal before the alert recovers.

    trigger_window str

    Describes how long a metric must be anomalous before an alert triggers.

    recoveryWindow String

    Describes how long an anomalous metric must be normal before the alert recovers.

    triggerWindow String

    Describes how long a metric must be anomalous before an alert triggers.

    MonitorMonitorThresholds, MonitorMonitorThresholdsArgs

    Critical string

    The monitor CRITICAL threshold. Must be a number.

    CriticalRecovery string

    The monitor CRITICAL recovery threshold. Must be a number.

    Ok string

    The monitor OK threshold. Only supported in monitor type service check. Must be a number.

    Unknown string

    The monitor UNKNOWN threshold. Only supported in monitor type service check. Must be a number.

    Warning string

    The monitor WARNING threshold. Must be a number.

    WarningRecovery string

    The monitor WARNING recovery threshold. Must be a number.

    Critical string

    The monitor CRITICAL threshold. Must be a number.

    CriticalRecovery string

    The monitor CRITICAL recovery threshold. Must be a number.

    Ok string

    The monitor OK threshold. Only supported in monitor type service check. Must be a number.

    Unknown string

    The monitor UNKNOWN threshold. Only supported in monitor type service check. Must be a number.

    Warning string

    The monitor WARNING threshold. Must be a number.

    WarningRecovery string

    The monitor WARNING recovery threshold. Must be a number.

    critical String

    The monitor CRITICAL threshold. Must be a number.

    criticalRecovery String

    The monitor CRITICAL recovery threshold. Must be a number.

    ok String

    The monitor OK threshold. Only supported in monitor type service check. Must be a number.

    unknown String

    The monitor UNKNOWN threshold. Only supported in monitor type service check. Must be a number.

    warning String

    The monitor WARNING threshold. Must be a number.

    warningRecovery String

    The monitor WARNING recovery threshold. Must be a number.

    critical string

    The monitor CRITICAL threshold. Must be a number.

    criticalRecovery string

    The monitor CRITICAL recovery threshold. Must be a number.

    ok string

    The monitor OK threshold. Only supported in monitor type service check. Must be a number.

    unknown string

    The monitor UNKNOWN threshold. Only supported in monitor type service check. Must be a number.

    warning string

    The monitor WARNING threshold. Must be a number.

    warningRecovery string

    The monitor WARNING recovery threshold. Must be a number.

    critical str

    The monitor CRITICAL threshold. Must be a number.

    critical_recovery str

    The monitor CRITICAL recovery threshold. Must be a number.

    ok str

    The monitor OK threshold. Only supported in monitor type service check. Must be a number.

    unknown str

    The monitor UNKNOWN threshold. Only supported in monitor type service check. Must be a number.

    warning str

    The monitor WARNING threshold. Must be a number.

    warning_recovery str

    The monitor WARNING recovery threshold. Must be a number.

    critical String

    The monitor CRITICAL threshold. Must be a number.

    criticalRecovery String

    The monitor CRITICAL recovery threshold. Must be a number.

    ok String

    The monitor OK threshold. Only supported in monitor type service check. Must be a number.

    unknown String

    The monitor UNKNOWN threshold. Only supported in monitor type service check. Must be a number.

    warning String

    The monitor WARNING threshold. Must be a number.

    warningRecovery String

    The monitor WARNING recovery threshold. Must be a number.

    MonitorSchedulingOption, MonitorSchedulingOptionArgs

    EvaluationWindows List<MonitorSchedulingOptionEvaluationWindow>

    Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

    EvaluationWindows []MonitorSchedulingOptionEvaluationWindow

    Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

    evaluationWindows List<MonitorSchedulingOptionEvaluationWindow>

    Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

    evaluationWindows MonitorSchedulingOptionEvaluationWindow[]

    Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

    evaluation_windows Sequence[MonitorSchedulingOptionEvaluationWindow]

    Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

    evaluationWindows List<Property Map>

    Configuration options for the evaluation window. If hour_starts is set, no other fields may be set. Otherwise, day_starts and month_starts must be set together.

    MonitorSchedulingOptionEvaluationWindow, MonitorSchedulingOptionEvaluationWindowArgs

    dayStarts String
    hourStarts Integer
    monthStarts Integer
    dayStarts string
    hourStarts number
    monthStarts number
    dayStarts String
    hourStarts Number
    monthStarts Number

    MonitorVariables, MonitorVariablesArgs

    EventQueries List<MonitorVariablesEventQuery>

    A timeseries formula and functions events query.

    EventQueries []MonitorVariablesEventQuery

    A timeseries formula and functions events query.

    eventQueries List<MonitorVariablesEventQuery>

    A timeseries formula and functions events query.

    eventQueries MonitorVariablesEventQuery[]

    A timeseries formula and functions events query.

    event_queries Sequence[MonitorVariablesEventQuery]

    A timeseries formula and functions events query.

    eventQueries List<Property Map>

    A timeseries formula and functions events query.

    MonitorVariablesEventQuery, MonitorVariablesEventQueryArgs

    MonitorVariablesEventQueryCompute, MonitorVariablesEventQueryComputeArgs

    Aggregation string
    Interval int
    Metric string
    Aggregation string
    Interval int
    Metric string
    aggregation String
    interval Integer
    metric String
    aggregation string
    interval number
    metric string
    aggregation String
    interval Number
    metric String

    MonitorVariablesEventQueryGroupBy, MonitorVariablesEventQueryGroupByArgs

    MonitorVariablesEventQueryGroupBySort, MonitorVariablesEventQueryGroupBySortArgs

    Aggregation string
    Metric string
    Order string
    Aggregation string
    Metric string
    Order string
    aggregation String
    metric String
    order String
    aggregation string
    metric string
    order string
    aggregation String
    metric String
    order String

    MonitorVariablesEventQuerySearch, MonitorVariablesEventQuerySearchArgs

    Query string
    Query string
    query String
    query string
    query str
    query String

    Import

     $ pulumi import datadog:index/monitor:Monitor bytes_received_localhost 2081
    

    Package Details

    Repository
    Datadog pulumi/pulumi-datadog
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the datadog Terraform Provider.

    datadog logo
    Datadog v4.23.0 published on Wednesday, Sep 27, 2023 by Pulumi