Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
brookesargent committed Jan 7, 2025
1 parent 8f009fa commit 08388d3
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/data-sources/recipient.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ In addition to all arguments above, the following attributes are exported:
* `secret` - (Sensitive) The webhook recipient's secret -- if of type `webhook`.
* `url` - The webhook recipient's URL - if of type `webhook`, `msteams` or `msteams_workflow`.
* `integration_key` - (Sensitive) The PagerDuty recipient's integration key -- if of type `pagerduty`.
* `integration_name` - The PagerDuty recipient's inregration name -- if of type `pagerduty`.
* `integration_name` - The PagerDuty recipient's integration name -- if of type `pagerduty`.
45 changes: 44 additions & 1 deletion docs/resources/burn_alert.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,47 @@ resource "honeycombio_burn_alert" "example_alert" {
}
```

### Example - Exhaustion Time Burn Alert with Webhook Recipient and Notification Variable
```hcl
variable "dataset" {
type = string
}
variable "slo_id" {
type = string
}
data "honeycombio_recipient" "custom_webhook" {
type = "webhook"
detail_filter {
name = "name"
value = "My Custom Webhook"
}
}
resource "honeycombio_burn_alert" "example_alert" {
exhaustion_minutes = 60
description = "Burn alert description"
dataset = var.dataset
slo_id = var.slo_id
dataset = var.dataset
slo_id = var.slo_id
recipient {
id = data.honeycombio_recipient.custom_webhook.id
notification_details {
variable {
name = "severity"
value = "info"
}
}
}
}
```


## Argument Reference

Expand Down Expand Up @@ -130,7 +171,9 @@ Each burn alert configuration may have one or more `recipient` blocks, which eac
* `type` - (Optional) The type of the recipient, allowed types are `email`, `pagerduty`, `msteams`, `slack` and `webhook`. Should not be used in combination with `id`.
* `target` - (Optional) Target of the recipient, this has another meaning depending on the type of recipient (see the table below). Should not be used in combination with `id`.
* `id` - (Optional) The ID of an already existing recipient. Should not be used in combination with `type` and `target`.
* `notification_details` - (Optional) a block of additional details to send along with the notification. The only supported option currently is `pagerduty_severity` which has a default value of `critical` but can be set to one of `info`, `warning`, `error`, or `critical` and must be used in combination with a PagerDuty recipient.
* `notification_details` - (Optional) a block of additional details to send along with the notification. Supported details are described below.
* `pagerduty_severity` - (Optional) Indicates the severity of an alert and has a default value of `critical` but can be set to one of `info`, `warning`, `error`, or `critical` and must be used in combination with a PagerDuty recipient.
* `variable` - (Optional) Up to 10 configuration blocks with a `name` and a `value` to override the default variable value. Must be used in combination with a Webhook recipient that already has a variable with the same name configured.

| Type | Target |
|-----------|---------------------|
Expand Down
73 changes: 70 additions & 3 deletions docs/resources/trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ variable "dataset" {
type = string
}
data "honeycombio_recipient" "pd-prod" {
data "honeycombio_recipient" "pd_prod" {
type = "pagerduty"
detail_filter {
Expand Down Expand Up @@ -97,7 +97,7 @@ resource "honeycombio_trigger" "example" {
}
recipient {
id = data.honeycombio_recipient.pd-prod.id
id = data.honeycombio_recipient.pd_prod.id
notification_details {
pagerduty_severity = "warning"
Expand All @@ -116,6 +116,71 @@ resource "honeycombio_trigger" "example" {
}
}
```
### Example - Example with Webhook Recipient and Notification Variable
```hcl
variable "dataset" {
type = string
}
data "honeycombio_recipient" "custom_webhook" {
type = "webhook"
detail_filter {
name = "name"
value = "My Custom Webhook"
}
}
data "honeycombio_query_specification" "example" {
calculation {
op = "AVG"
column = "duration_ms"
}
filter {
column = "trace.parent_id"
op = "does-not-exist"
}
}
resource "honeycombio_trigger" "example" {
name = "Requests are slower than usual"
description = "Average duration of all requests for the last 10 minutes."
query_json = data.honeycombio_query_specification.example.json
dataset = var.dataset
frequency = 600 // in seconds, 10 minutes
threshold {
op = ">"
value = 1000
exceeded_limit = 3
}
recipient {
id = data.honeycombio_recipient.custom_webhook.id
notification_details {
variable {
name = "severity"
value = "info"
}
}
}
evaluation_schedule {
start_time = "13:00"
end_time = "21:00"
days_of_week = [
"monday",
"wednesday",
"friday"
]
}
}
```

## Argument Reference

Expand Down Expand Up @@ -166,7 +231,9 @@ Cannot not be used in combination with `id`.
* `target` - (Optional) Target of the trigger recipient, this has another meaning depending on the type of recipient (see the table below).
Cannot not be used in combination with `id`.
* `id` - (Optional) The ID of an already existing recipient. Cannot not be used in combination with `type` and `target`.
* `notification_details` - (Optional) a block of additional details to send along with the notification. The only supported option currently is `pagerduty_severity` which has a default value of `critical` but can be set to one of `info`, `warning`, `error`, or `critical` and must be used in combination with a PagerDuty recipient.
* `notification_details` - (Optional) a block of additional details to send along with the notification.
* `pagerduty_severity` - (Optional) Indicates the severity of an alert and has a default value of `critical` but can be set to one of `info`, `warning`, `error`, or `critical` and must be used in combination with a PagerDuty recipient.
* `variable` - (Optional) Up to 10 configuration blocks with a `name` and a `value` to override the default variable value. Must be used in combination with a Webhook recipient that already has a variable with the same name configured.

Type | Target
----------|-------------------------
Expand Down

0 comments on commit 08388d3

Please sign in to comment.