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

monitor_search is not yet supported #358

Merged
merged 9 commits into from
Dec 12, 2019
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: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 2.5.1 (Unreleased)

BUGFIXES:
* `monitor_search`: Feature removed from SLO as it is not yet supported

## 2.5.0 (October 22, 2019)

FEATURES:
Expand Down
12 changes: 6 additions & 6 deletions datadog/resource_datadog_service_level_objective.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func resourceDatadogServiceLevelObjective() *schema.Resource {
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
ConflictsWith: []string{"monitor_ids", "monitor_search", "groups"},
ConflictsWith: []string{"monitor_ids", "groups"},
Description: "The metric query of good / total events",
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
Expand All @@ -113,15 +113,15 @@ func resourceDatadogServiceLevelObjective() *schema.Resource {
"monitor_ids": {
Type: schema.TypeSet,
Optional: true,
ConflictsWith: []string{"query", "monitor_search"},
ConflictsWith: []string{"query"},
Description: "A static set of monitor IDs to use as part of the SLO",
Elem: &schema.Schema{Type: schema.TypeInt, MinItems: 1},
},
"monitor_search": {
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{"query", "monitor_ids"},
Description: "A dynamic search on creation for the SLO",
Type: schema.TypeString,
Optional: true,
Removed: "Feature is not yet supported",
Computed: true,
},
"groups": {
Type: schema.TypeSet,
Expand Down
15 changes: 7 additions & 8 deletions website/docs/r/service_level_objective.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ resource "datadog_service_level_objective" "foo" {
target = 99.9
warning = 99.99
target_display = "99.900"
warning_display = "99.990"
warning_display = "99.990"
}

thresholds {
timeframe = "30d"
target = 99.9
warning = 99.99
target_display = "99.900"
warning_display = "99.990"
warning_display = "99.990"
}

tags = ["foo:bar", "baz"]
Expand All @@ -56,13 +56,13 @@ resource "datadog_service_level_objective" "bar" {
thresholds {
timeframe = "7d"
target = 99.9
warning = 99.99
warning = 99.99
}

thresholds {
timeframe = "30d"
target = 99.9
warning = 99.99
warning = 99.99
}

tags = ["foo:bar", "baz"]
Expand Down Expand Up @@ -96,17 +96,16 @@ The following options are specific to the `type` of service level objective:
* `numerator` - (Required) the sum of all the `good` events
* `denominator` - (Required) the sum of the `total` events
* Example Usage:

```hcl
query {
numerator = "sum:my.custom.count.metric{type:good}.as_count()"
denominator = "sum:my.custom.count.metric{*}.as_count()"
denominator = "sum:my.custom.count.metric{*}.as_count()"
}
```

* `monitor` type SLOs:
* `monitor_ids` - (Optional) A list of numeric monitor IDs for which to use as SLIs. Their tags will be auto-imported into `monitor_tags` field in the API resource. At least 1 of `monitor_ids` or `monitor_search` must be provided.
* `monitor_search` - (Optional) The monitor query search used on the monitor search API to add monitor_ids by searching. Their tags will be auto-imported into `monitor_tags` field in the API resource. At least 1 of `monitor_ids` or `monitor_search` must be provided.
* `monitor_ids` - (Required) A list of numeric monitor IDs for which to use as SLIs. Their tags will be auto-imported into `monitor_tags` field in the API resource.
* `groups` - (Optional) A custom set of groups from the monitor(s) for which to use as the SLI instead of all the groups.


Expand Down