Show / Hide Table of Contents

Class Monitor

Inheritance
System.Object
Resource
CustomResource
Monitor
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Datadog
Assembly: Pulumi.Datadog.dll
Syntax
public class Monitor : CustomResource

Constructors

View Source

Monitor(String, MonitorArgs, CustomResourceOptions)

Create a Monitor resource with the given unique name, arguments, and options.

Declaration
public Monitor(string name, MonitorArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

MonitorArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

EnableLogsSample

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

Declaration
public Output<bool?> EnableLogsSample { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

EscalationMessage

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

Declaration
public Output<string> EscalationMessage { get; }
Property Value
Type Description
Output<System.String>
View Source

EvaluationDelay

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.

Declaration
public Output<int> EvaluationDelay { get; }
Property Value
Type Description
Output<System.Int32>
View Source

IncludeTags

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

Declaration
public Output<bool?> IncludeTags { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Locked

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

Declaration
public Output<bool?> Locked { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Message

A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username&apos; notation as events.

Declaration
public Output<string> Message { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

Name of Datadog monitor

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

NewHostDelay

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. Defaults to 300.

Declaration
public Output<int?> NewHostDelay { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

NoDataTimeframe

The number of minutes before a monitor will notify when data stops reporting. Must be at least 2x the monitor timeframe for metric alerts or 2 minutes for service checks. Default: 2x timeframe for metric alerts, 2 minutes for service checks. Defaults to 10 minutes.

Declaration
public Output<int?> NoDataTimeframe { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

NotifyAudit

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

Declaration
public Output<bool?> NotifyAudit { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

NotifyNoData

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

Declaration
public Output<bool?> NotifyNoData { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Query

Declaration
public Output<string> Query { get; }
Property Value
Type Description
Output<System.String>
View Source

RenotifyInterval

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.

Declaration
public Output<int?> RenotifyInterval { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

RequireFullWindow

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.

Declaration
public Output<bool?> RequireFullWindow { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Silenced

Declaration
public Output<ImmutableDictionary<string, object>> Silenced { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>>
View Source

Tags

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

Declaration
public Output<ImmutableArray<string>> Tags { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Thresholds

  • Metric alerts: A dictionary of thresholds by threshold type. Currently we have four threshold types for metric alerts: critical, critical recovery, warning, and warning recovery. Critical is defined in the query, but can also be specified in this option. Warning and recovery thresholds can only be specified using the thresholds option. Example usage:
thresholds = {
critical          = 90
critical_recovery = 85
warning           = 80
warning_recovery  = 75
}

Warning: the critical threshold value must match the one contained in the query argument. The threshold from the previous example is valid along with a query like avg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90 but along with something like avg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95 would make the Datadog API return a HTTP error 400, complaining "The value provided for parameter 'query' is invalid".

  • Service checks: A dictionary of thresholds by status. Because service checks can have multiple thresholds, we don't define them directly in the query. Default values:
thresholds = {
ok       = 1
critical = 1
warning  = 1
unknown  = 1
}
Declaration
public Output<MonitorThresholds> Thresholds { get; }
Property Value
Type Description
Output<MonitorThresholds>
View Source

ThresholdWindows

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

Declaration
public Output<MonitorThresholdWindows> ThresholdWindows { get; }
Property Value
Type Description
Output<MonitorThresholdWindows>
View Source

TimeoutH

The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.

Declaration
public Output<int?> TimeoutH { get; }
Property Value
Type Description
Output<System.Nullable<System.Int32>>
View Source

Type

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. The available options are below. Note: The monitor type cannot be changed after a monitor is created.

  • metric alert
  • service check
  • event alert
  • query alert
  • composite
  • log alert
Declaration
public Output<string> Type { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, MonitorState, CustomResourceOptions)

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

Declaration
public static Monitor Get(string name, Input<string> id, MonitorState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

MonitorState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Monitor
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.