Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add doc for monitor datasource #585

Merged
merged 3 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions datadog/data_source_datadog_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,6 @@ func dataSourceDatadogMonitor() *schema.Resource {
Type: schema.TypeBool,
Computed: true,
},
"force_delete": {
Type: schema.TypeBool,
Computed: true,
},
},
}
}
Expand Down
3 changes: 3 additions & 0 deletions website/datadog.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
<li<%= sidebar_current("docs-datadog-datasource-ip-ranges") %>>
<a href="/docs/providers/datadog/d/ip_ranges.html">datadog_ip_ranges</a>
</li>
<li<%= sidebar_current("docs-datadog-datasource-monitor") %>>
<a href="/docs/providers/datadog/d/monitor.html">datadog_monitor</a>
</li>
</ul>
</li>

Expand Down
54 changes: 54 additions & 0 deletions website/docs/d/monitor.html.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
layout: "datadog"
page_title: "Datadog: datadog_monitor"
sidebar_current: "docs-datadog-datasource-monitor"
description: |-
Retrieve information about an existing monitor.
---

# datadog_monitor

Use this data source to retrieve information about an existing monitor for use in other resources.

## Example Usage

```
data "datadog_monitor" "test" {
name_filter = "My awesome monitor"
monitor_tags_filter = ["foo:bar"]
}
```

## Argument Reference

* `name_filter` - (Optional) A monitor name to limit the search.
* `tags_filter` - (Optional) A list of tags to limit the search. This filters on the monitor scope.
* `monitor_tags_filter` - (Optional) A list of monitor tags to limit the search. This filters on the tags set on the monitor itself.

~> **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.

## Attributes Reference

* `id` - ID of the Datadog monitor
* `name` - Name of the monitor.
* `type` - Type of the monitor.
* `query` - Query of the monitor.
* `message` - Message included with notifications for this monitor.
* `escalation_message` - Message included with a re-notification for this monitor.
* `thresholds` - Alert thresholds of the monitor.
* `notify_no_data` - Whether or not this monitor notifies when data stops reporting.
* `new_host_delay` - Time (in seconds) allowing a host to boot and
applications to fully start before starting the evaluation of monitor
results.
* `evaluation_delay` - Time (in seconds) for which evaluation is delayed. This is only used by metric monitors.
* `no_data_timeframe` - The number of minutes before the monitor notifies when data stops reporting.
* `renotify_interval` - The number of minutes after the last notification before the monitor re-notifies on the current status.
* `notify_audit` - Whether or not tagged users are notified on changes to the monitor.
* `timeout_h` - Number of hours of the monitor not reporting data before it automatically resolves from a triggered state.
* `include_tags` - Whether or not notifications from the monitor automatically inserts its triggering tags into the title.
* `enable_logs_sample` - Whether or not a list of log values which triggered the alert is included. This is only used by log monitors.
* `require_full_window` - Whether or not the monitor needs a full window of data before it is evaluated.
* `locked` - Whether or not changes to the monitor are restricted to the creator or admins.
* `tags` - List of tags associated with the monitor.
* `threshold_windows` - Mapping containing `recovery_window` and `trigger_window` values, e.g. `last_15m`. This is only used by anomaly monitors.