|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "grafana_asserts_thresholds Resource - terraform-provider-grafana" |
| 4 | +subcategory: "Knowledge Graph" |
| 5 | +description: |- |
| 6 | + Manages Knowledge Graph Thresholds configuration (request, resource, health) via bulk endpoints. |
| 7 | +--- |
| 8 | + |
| 9 | +# grafana_asserts_thresholds (Resource) |
| 10 | + |
| 11 | +Manages Knowledge Graph Thresholds configuration (request, resource, health) via bulk endpoints. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +```terraform |
| 16 | +resource "grafana_asserts_thresholds" "basic" { |
| 17 | + request_thresholds = [{ |
| 18 | + entity_name = "payment-service" |
| 19 | + assertion_name = "ErrorRatioBreach" |
| 20 | + request_type = "inbound" |
| 21 | + request_context = "/charge" |
| 22 | + value = 0.01 |
| 23 | + }] |
| 24 | +
|
| 25 | + resource_thresholds = [{ |
| 26 | + assertion_name = "Saturation" |
| 27 | + resource_type = "container" |
| 28 | + container_name = "worker" |
| 29 | + source = "metrics" |
| 30 | + severity = "warning" |
| 31 | + value = 75 |
| 32 | + }] |
| 33 | +
|
| 34 | + health_thresholds = [{ |
| 35 | + assertion_name = "ServiceDown" |
| 36 | + expression = "up < 1" |
| 37 | + entity_type = "Service" |
| 38 | + }] |
| 39 | +} |
| 40 | +``` |
| 41 | + |
| 42 | +<!-- schema generated by tfplugindocs --> |
| 43 | +## Schema |
| 44 | + |
| 45 | +### Optional |
| 46 | + |
| 47 | +- `health_thresholds` (Block List) List of health thresholds. (see [below for nested schema](#nestedblock--health_thresholds)) |
| 48 | +- `request_thresholds` (Block List) List of request thresholds. (see [below for nested schema](#nestedblock--request_thresholds)) |
| 49 | +- `resource_thresholds` (Block List) List of resource thresholds. (see [below for nested schema](#nestedblock--resource_thresholds)) |
| 50 | + |
| 51 | +### Read-Only |
| 52 | + |
| 53 | +- `id` (String) The ID of this resource. |
| 54 | + |
| 55 | +<a id="nestedblock--health_thresholds"></a> |
| 56 | +### Nested Schema for `health_thresholds` |
| 57 | + |
| 58 | +Required: |
| 59 | + |
| 60 | +- `assertion_name` (String) Assertion name. |
| 61 | +- `entity_type` (String) Entity type for the health threshold (e.g., Service, Pod, Namespace, Volume). |
| 62 | +- `expression` (String) Prometheus expression. |
| 63 | + |
| 64 | +Optional: |
| 65 | + |
| 66 | +- `alert_category` (String) Optional alert category label for the health threshold. |
| 67 | + |
| 68 | + |
| 69 | +<a id="nestedblock--request_thresholds"></a> |
| 70 | +### Nested Schema for `request_thresholds` |
| 71 | + |
| 72 | +Required: |
| 73 | + |
| 74 | +- `assertion_name` (String) Assertion name (e.g., RequestRateAnomaly, ErrorRatioBreach). |
| 75 | +- `entity_name` (String) Entity name the threshold applies to. |
| 76 | +- `request_context` (String) Request context (e.g., path or context identifier). |
| 77 | +- `request_type` (String) Request type (e.g., inbound/outbound). |
| 78 | +- `value` (Number) Threshold value. |
| 79 | + |
| 80 | + |
| 81 | +<a id="nestedblock--resource_thresholds"></a> |
| 82 | +### Nested Schema for `resource_thresholds` |
| 83 | + |
| 84 | +Required: |
| 85 | + |
| 86 | +- `assertion_name` (String) Assertion name (e.g., Saturation, ResourceRateBreach). |
| 87 | +- `container_name` (String) Container name. |
| 88 | +- `resource_type` (String) Resource type (e.g., container/pod/node). |
| 89 | +- `severity` (String) Severity (warning or critical). |
| 90 | +- `source` (String) Data source for the threshold (e.g., metrics/logs). |
| 91 | +- `value` (Number) Threshold value. |
| 92 | + |
| 93 | +## Import |
| 94 | + |
| 95 | +Import is supported using the following syntax: |
| 96 | + |
| 97 | +```shell |
| 98 | +terraform import grafana_asserts_thresholds.name "{{ id }}" |
| 99 | +``` |
0 commit comments