Monitor
Create a Monitor Resource
new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);def Monitor(resource_name, opts=None, enable_logs_sample=None, escalation_message=None, evaluation_delay=None, include_tags=None, locked=None, message=None, name=None, new_host_delay=None, no_data_timeframe=None, notify_audit=None, notify_no_data=None, query=None, renotify_interval=None, require_full_window=None, silenced=None, tags=None, threshold_windows=None, thresholds=None, timeout_h=None, type=None, __props__=None);func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
Monitor Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Monitor resource accepts the following input properties:
- Message string
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.
- Name string
Name of Datadog monitor
- Query string
- 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. 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- Enable
Logs boolSample 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.
- Escalation
Message string A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- Evaluation
Delay int 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- New
Host intDelay 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.
- No
Data intTimeframe 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.
- Notify
Audit bool A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- Notify
No boolData A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- 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.
- Require
Full boolWindow 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.
- Silenced Dictionary<string, object>
- 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
- Threshold
Windows MonitorThreshold Windows Args A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- Thresholds
Monitor
Thresholds Args - 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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- Timeout
H int The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
- Message string
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.
- Name string
Name of Datadog monitor
- Query string
- 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. 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- Enable
Logs boolSample 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.
- Escalation
Message string A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- Evaluation
Delay int 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- New
Host intDelay 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.
- No
Data intTimeframe 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.
- Notify
Audit bool A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- Notify
No boolData A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- 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.
- Require
Full boolWindow 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.
- Silenced map[string]interface{}
- []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
- Threshold
Windows MonitorThreshold Windows A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- Thresholds
Monitor
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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- Timeout
H int The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
- message string
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.
- name string
Name of Datadog monitor
- query string
- 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. 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- enable
Logs booleanSample 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.
- escalation
Message string A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- evaluation
Delay number 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- new
Host numberDelay 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.
- no
Data numberTimeframe 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.
- notify
Audit boolean A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- notify
No booleanData A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- renotify
Interval 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.
- require
Full booleanWindow 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.
- silenced {[key: string]: any}
- 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
- threshold
Windows MonitorThreshold Windows A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- thresholds
Monitor
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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- timeout
H number The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
- message str
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.
- name str
Name of Datadog monitor
- query str
- 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. 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- enable_
logs_ boolsample 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.
- escalation_
message str A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- evaluation_
delay float 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- new_
host_ floatdelay 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.
- no_
data_ floattimeframe 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.
- notify_
audit bool A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- notify_
no_ booldata A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- renotify_
interval float 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.
- require_
full_ boolwindow 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.
- silenced Dict[str, Any]
- List[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
- threshold_
windows Dict[MonitorThreshold Windows] A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- thresholds
Dict[Monitor
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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- timeout_
h float The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
Outputs
All input properties are implicitly available as output properties. Additionally, the Monitor resource produces the following output properties:
Look up an 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): Monitorstatic get(resource_name, id, opts=None, enable_logs_sample=None, escalation_message=None, evaluation_delay=None, include_tags=None, locked=None, message=None, name=None, new_host_delay=None, no_data_timeframe=None, notify_audit=None, notify_no_data=None, query=None, renotify_interval=None, require_full_window=None, silenced=None, tags=None, threshold_windows=None, thresholds=None, timeout_h=None, type=None, __props__=None);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)- 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.
The following state arguments are supported:
- Enable
Logs boolSample 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.
- Escalation
Message string A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- Evaluation
Delay int 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- Message string
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.
- Name string
Name of Datadog monitor
- New
Host intDelay 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.
- No
Data intTimeframe 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.
- Notify
Audit bool A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- Notify
No boolData A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- Query string
- 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.
- Require
Full boolWindow 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.
- Silenced Dictionary<string, object>
- 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
- Threshold
Windows MonitorThreshold Windows Args A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- Thresholds
Monitor
Thresholds Args - 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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- Timeout
H int The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
- 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. 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
- Enable
Logs boolSample 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.
- Escalation
Message string A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- Evaluation
Delay int 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- Message string
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.
- Name string
Name of Datadog monitor
- New
Host intDelay 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.
- No
Data intTimeframe 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.
- Notify
Audit bool A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- Notify
No boolData A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- Query string
- 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.
- Require
Full boolWindow 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.
- Silenced map[string]interface{}
- []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
- Threshold
Windows MonitorThreshold Windows A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- Thresholds
Monitor
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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- Timeout
H int The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
- 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. 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
- enable
Logs booleanSample 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.
- escalation
Message string A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- evaluation
Delay number 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- message string
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.
- name string
Name of Datadog monitor
- new
Host numberDelay 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.
- no
Data numberTimeframe 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.
- notify
Audit boolean A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- notify
No booleanData A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- query string
- renotify
Interval 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.
- require
Full booleanWindow 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.
- silenced {[key: string]: any}
- 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
- threshold
Windows MonitorThreshold Windows A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- thresholds
Monitor
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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- timeout
H number The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
- 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. 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
- enable_
logs_ boolsample 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.
- escalation_
message str A message to include with a re-notification. Supports the ‘@username’ notification allowed elsewhere.
- evaluation_
delay float 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.
- 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 to this monitor should be restricted to the creator or admins. Defaults to False.
- message str
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.
- name str
Name of Datadog monitor
- new_
host_ floatdelay 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.
- no_
data_ floattimeframe 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.
- notify_
audit bool A boolean indicating whether tagged users will be notified on changes to this monitor. Defaults to false.
- notify_
no_ booldata A boolean indicating whether this monitor will notify when data stops reporting. Defaults to false.
- query str
- renotify_
interval float 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.
- require_
full_ boolwindow 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.
- silenced Dict[str, Any]
- List[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
- threshold_
windows Dict[MonitorThreshold Windows] A mapping containing
recovery_windowandtrigger_windowvalues, e.g.last_15m. Can only be used for, and are required for, anomaly monitors.- thresholds
Dict[Monitor
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: thecriticalthreshold value must match the one contained in thequeryargument. Thethresholdfrom the previous example is valid along with a query likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 90but along with something likeavg(last_1h):avg:system.disk.in_use{role:sqlserver} by {host} > 95would 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 }
- 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:
- timeout_
h float The number of hours of the monitor not reporting data before it will automatically resolve from a triggered state. Defaults to false.
- 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. 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
Supporting Types
MonitorThresholdWindows
- Recovery
Window string describes how long an anomalous metric must be normal before the alert recovers.
- Trigger
Window string describes how long a metric must be anomalous before an alert triggers.
- Recovery
Window string describes how long an anomalous metric must be normal before the alert recovers.
- Trigger
Window string describes how long a metric must be anomalous before an alert triggers.
- recovery
Window string describes how long an anomalous metric must be normal before the alert recovers.
- trigger
Window 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.
MonitorThresholds
Package Details
- Repository
- https://github.com/pulumi/pulumi-datadog
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
datadogTerraform Provider.