|
1 | 1 | ---
|
2 |
| -page_title: "datadog_monitor" |
| 2 | +page_title: "datadog_monitor Data Source - terraform-provider-datadog" |
| 3 | +subcategory: "" |
| 4 | +description: |- |
| 5 | + Use this data source to retrieve information about an existing monitor for use in other resources. |
3 | 6 | ---
|
4 | 7 |
|
5 |
| -# datadog_monitor Data Source |
| 8 | +# Data Source `datadog_monitor` |
6 | 9 |
|
7 | 10 | Use this data source to retrieve information about an existing monitor for use in other resources.
|
8 | 11 |
|
9 | 12 | ## Example Usage
|
10 | 13 |
|
11 |
| -``` |
| 14 | +```terraform |
12 | 15 | data "datadog_monitor" "test" {
|
13 | 16 | name_filter = "My awesome monitor"
|
14 | 17 | monitor_tags_filter = ["foo:bar"]
|
15 | 18 | }
|
16 | 19 | ```
|
17 | 20 |
|
18 |
| -## Argument Reference |
19 |
| - |
20 |
| -- `name_filter`: (Optional) A monitor name to limit the search. |
21 |
| -- `tags_filter`: (Optional) A list of tags to limit the search. This filters on the monitor scope. |
22 |
| -- `monitor_tags_filter`: (Optional) A list of monitor tags to limit the search. This filters on the tags set on the monitor itself. |
23 |
| - |
24 |
| -~> **NOTE:** If more or less than a single match is returned by the search, Terraform will fail. Ensure that your search is specific enough to return a single monitor. |
25 |
| - |
26 |
| -## Attributes Reference |
27 |
| - |
28 |
| -- `id`: ID of the Datadog monitor |
29 |
| -- `name`: Name of the monitor. |
30 |
| -- `type`: Type of the monitor. |
31 |
| -- `query`: Query of the monitor. |
32 |
| -- `message`: Message included with notifications for this monitor. |
33 |
| -- `escalation_message`: Message included with a re-notification for this monitor. |
34 |
| -- `thresholds`: (Deprecated) Alert thresholds of the monitor. Use `monitor_thresholds` instead. |
35 |
| -- `monitor_thresholds`: Alert thresholds of the monitor. List of one element containing the threshold definitions. |
36 |
| -- `notify_no_data`: Whether or not this monitor notifies when data stops reporting. |
37 |
| -- `new_host_delay`: Time (in seconds) allowing a host to boot and applications to fully start before starting the evaluation of monitor results. |
38 |
| -- `evaluation_delay`: Time (in seconds) for which evaluation is delayed. This is only used by metric monitors. |
39 |
| -- `no_data_timeframe`: The number of minutes before the monitor notifies when data stops reporting. |
40 |
| -- `renotify_interval`: The number of minutes after the last notification before the monitor re-notifies on the current status. |
41 |
| -- `notify_audit`: Whether or not tagged users are notified on changes to the monitor. |
42 |
| -- `timeout_h`: Number of hours of the monitor not reporting data before it automatically resolves from a triggered state. |
43 |
| -- `include_tags`: Whether or not notifications from the monitor automatically inserts its triggering tags into the title. |
44 |
| -- `enable_logs_sample`: Whether or not a list of log values which triggered the alert is included. This is only used by log monitors. |
45 |
| -- `require_full_window`: Whether or not the monitor needs a full window of data before it is evaluated. |
46 |
| -- `locked`: Whether or not changes to the monitor are restricted to the creator or admins. |
47 |
| -- `tags`: List of tags associated with the monitor. |
48 |
| -- `threshold_windows`: (Deprecated) Mapping containing `recovery_window` and `trigger_window` values, e.g. `last_15m`. This is only used by anomaly monitors. Use `monitor_threshold_windows` instead. |
49 |
| -- `monitor_threshold_windows`: Mapping containing `recovery_window` and `trigger_window` values, e.g. `last_15m`. This is only used by anomaly monitors. List of one element containing the threshold window definitions. |
| 21 | +## Schema |
| 22 | + |
| 23 | +### Optional |
| 24 | + |
| 25 | +- **id** (String) The ID of this resource. |
| 26 | +- **monitor_tags_filter** (List of String) A list of monitor tags to limit the search. This filters on the tags set on the monitor itself. |
| 27 | +- **name_filter** (String) A monitor name to limit the search. |
| 28 | +- **tags_filter** (List of String) A list of tags to limit the search. This filters on the monitor scope. |
| 29 | + |
| 30 | +### Read-only |
| 31 | + |
| 32 | +- **enable_logs_sample** (Boolean) Whether or not a list of log values which triggered the alert is included. This is only used by log monitors. |
| 33 | +- **escalation_message** (String) Message included with a re-notification for this monitor. |
| 34 | +- **evaluation_delay** (Number) Time (in seconds) for which evaluation is delayed. This is only used by metric monitors. |
| 35 | +- **include_tags** (Boolean) Whether or not notifications from the monitor automatically inserts its triggering tags into the title. |
| 36 | +- **locked** (Boolean) Whether or not changes to the monitor are restricted to the creator or admins. |
| 37 | +- **message** (String) Message included with notifications for this monitor |
| 38 | +- **monitor_threshold_windows** (List of Object) Mapping containing `recovery_window` and `trigger_window` values, e.g. `last_15m`. This is only used by anomaly monitors. (see [below for nested schema](#nestedatt--monitor_threshold_windows)) |
| 39 | +- **monitor_thresholds** (List of Object) Alert thresholds of the monitor. (see [below for nested schema](#nestedatt--monitor_thresholds)) |
| 40 | +- **name** (String) Name of the monitor |
| 41 | +- **new_host_delay** (Number) Time (in seconds) allowing a host to boot and applications to fully start before starting the evaluation of monitor results. |
| 42 | +- **no_data_timeframe** (Number) The number of minutes before the monitor notifies when data stops reporting. |
| 43 | +- **notify_audit** (Boolean) Whether or not tagged users are notified on changes to the monitor. |
| 44 | +- **notify_no_data** (Boolean) Whether or not this monitor notifies when data stops reporting. |
| 45 | +- **query** (String) Query of the monitor. |
| 46 | +- **renotify_interval** (Number) The number of minutes after the last notification before the monitor re-notifies on the current status. |
| 47 | +- **require_full_window** (Boolean) Whether or not the monitor needs a full window of data before it is evaluated. |
| 48 | +- **tags** (Set of String) List of tags associated with the monitor. |
| 49 | +- **threshold_windows** (Map of String, Deprecated) Mapping containing `recovery_window` and `trigger_window` values, e.g. `last_15m`. This is only used by anomaly monitors. |
| 50 | +- **thresholds** (Map of String, Deprecated) Alert thresholds of the monitor. |
| 51 | +- **timeout_h** (Number) Number of hours of the monitor not reporting data before it automatically resolves from a triggered state. |
| 52 | +- **type** (String) Type of the monitor. |
| 53 | + |
| 54 | +<a id="nestedatt--monitor_threshold_windows"></a> |
| 55 | +### Nested Schema for `monitor_threshold_windows` |
| 56 | + |
| 57 | +Read-only: |
| 58 | + |
| 59 | +- **recovery_window** (String) |
| 60 | +- **trigger_window** (String) |
| 61 | + |
| 62 | + |
| 63 | +<a id="nestedatt--monitor_thresholds"></a> |
| 64 | +### Nested Schema for `monitor_thresholds` |
| 65 | + |
| 66 | +Read-only: |
| 67 | + |
| 68 | +- **critical** (String) |
| 69 | +- **critical_recovery** (String) |
| 70 | +- **ok** (String) |
| 71 | +- **unknown** (String) |
| 72 | +- **warning** (String) |
| 73 | +- **warning_recovery** (String) |
| 74 | + |
| 75 | + |
0 commit comments