Class Monitor
Inherited Members
Namespace: Pulumi.Datadog
Assembly: Pulumi.Datadog.dll
Syntax
public class Monitor : CustomResource
Constructors
View SourceMonitor(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 SourceEnableLogsSample
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>> |
EscalationMessage
A message to include with a re-notification. Supports the '@username' notification allowed elsewhere.
Declaration
public Output<string> EscalationMessage { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
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>> |
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>> |
Message
A message to include with notifications for this monitor. Email notifications can be sent to specific users by using the same '@username' notation as events.
Declaration
public Output<string> Message { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Name
Name of Datadog monitor
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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>> |
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>> |
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>> |
Query
Declaration
public Output<string> Query { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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>> |
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>> |
Silenced
Declaration
public Output<ImmutableDictionary<string, object>> Silenced { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
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>> |
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> |
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> |
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>> |
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 alertservice checkevent alertquery alertcompositelog alert
Declaration
public Output<string> Type { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(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 |