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
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` - (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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If one of monitor_ids and monitor_search must be provided and we are hiding monitor_search, shouldn't we then also make monitor_ids required for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkabrda that makes sense to me. I haven't actually updated any code here...should we just document that monitor_ids is required for now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted so monitor_ids is required

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bkabrda this should be ready for another review when you can

* `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