Skip to content

Commit

Permalink
feat: PC-12014 Support CompositesV2 (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
BSski authored Apr 12, 2024
1 parent 5341f94 commit 3f72ccf
Show file tree
Hide file tree
Showing 3 changed files with 482 additions and 74 deletions.
113 changes: 77 additions & 36 deletions docs/resources/slo.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,67 +145,95 @@ resource "nobl9_slo" "this" {

### Required

- `budgeting_method` (String) Method which will be use to calculate budget
- `indicator` (Block Set, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--indicator))
- `budgeting_method` (String) Method which will be use to calculate budget.
- `name` (String) Unique name of the resource, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- `objective` (Block Set, Min: 1) [Objectives documentation](https://docs.nobl9.com/yaml-guide#objective) (see [below for nested schema](#nestedblock--objective))
- `project` (String) Name of the Nobl9 project the resource sits in, must conform to the naming convention from [DNS RFC1123](https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names).
- `service` (String) Name of the service
- `service` (String) Name of the service.
- `time_window` (Block Set, Min: 1, Max: 1) (see [below for nested schema](#nestedblock--time_window))

### Optional

- `alert_policies` (List of String) Alert Policies attached to SLO
- `alert_policies` (List of String) Alert Policies attached to SLO.
- `anomaly_config` (Block Set, Max: 1) Configuration for Anomalies. Currently supported Anomaly Type is NoData (see [below for nested schema](#nestedblock--anomaly_config))
- `attachment` (Block List, Max: 20) (see [below for nested schema](#nestedblock--attachment))
- `attachments` (Block List, Max: 20, Deprecated) (see [below for nested schema](#nestedblock--attachments))
- `composite` (Block Set, Max: 1) [Composite SLO documentation](https://docs.nobl9.com/yaml-guide/#slo) (see [below for nested schema](#nestedblock--composite))
- `composite` (Block Set, Max: 1, Deprecated) [Composite SLO documentation](https://docs.nobl9.com/yaml-guide/#slo) (see [below for nested schema](#nestedblock--composite))
- `description` (String) Optional description of the resource. Here, you can add details about who is responsible for the integration (team/owner) or the purpose of creating it.
- `display_name` (String) User-friendly display name of the resource.
- `indicator` (Block Set, Max: 1) (see [below for nested schema](#nestedblock--indicator))
- `label` (Block List) [Labels](https://docs.nobl9.com/Features/labels/) containing a single key and a list of values. (see [below for nested schema](#nestedblock--label))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--indicator"></a>
### Nested Schema for `indicator`
<a id="nestedblock--objective"></a>
### Nested Schema for `objective`

Required:

- `name` (String) Name of the metric source (agent).
- `target` (Number) Designated value.
- `value` (Number) Value.

Optional:

- `kind` (String) Kind of the metric source. One of {Agent, Direct}.
- `project` (String) Name of the metric source project.

- `composite` (Block Set) An assembly of objectives from different SLOs reflecting their combined performance. (see [below for nested schema](#nestedblock--objective--composite))
- `count_metrics` (Block Set) Compares two time series, calculating the ratio of either good or bad values to the total number of values. Fill either the 'good' or 'bad' series, but not both. (see [below for nested schema](#nestedblock--objective--count_metrics))
- `display_name` (String) Name to be displayed.
- `name` (String) Objective's name. This field is computed if not provided.
- `op` (String) Type of logical operation.
- `primary` (Boolean) Is objective marked as primary.
- `raw_metric` (Block Set) Raw data is used to compare objective values. (see [below for nested schema](#nestedblock--objective--raw_metric))
- `time_slice_target` (Number) Designated value for slice.

<a id="nestedblock--objective"></a>
### Nested Schema for `objective`
<a id="nestedblock--objective--composite"></a>
### Nested Schema for `objective.composite`

Required:

- `display_name` (String) Name to be displayed
- `target` (Number) Designated value
- `value` (Number) Value
- `max_delay` (String) Maximum time for your composite SLO to wait for data from objectives.

Optional:

- `count_metrics` (Block Set) Compares two time series, calculating the ratio of either good or bad values to the total number of values. Fill either the 'good' or 'bad' series, but not both. (see [below for nested schema](#nestedblock--objective--count_metrics))
- `name` (String) Objective's name. This field is computed if not provided.
- `op` (String) Type of logical operation
- `primary` (Boolean) Is objective marked as primary.
- `raw_metric` (Block Set) Raw data is used to compare objective values. (see [below for nested schema](#nestedblock--objective--raw_metric))
- `time_slice_target` (Number) Designated value for slice
- `components` (Block Set) Objectives to be assembled in your composite SLO. (see [below for nested schema](#nestedblock--objective--composite--components))

<a id="nestedblock--objective--composite--components"></a>
### Nested Schema for `objective.composite.components`

Optional:

- `objectives` (Block Set) An additional nesting for the components of your composite SLO. (see [below for nested schema](#nestedblock--objective--composite--components--objectives))

<a id="nestedblock--objective--composite--components--objectives"></a>
### Nested Schema for `objective.composite.components.objectives`

Optional:

- `composite_objective` (Block List) Your composite SLO component. (see [below for nested schema](#nestedblock--objective--composite--components--objectives--composite_objective))

<a id="nestedblock--objective--composite--components--objectives--composite_objective"></a>
### Nested Schema for `objective.composite.components.objectives.composite_objective`

Required:

- `objective` (String) SLO objective name.
- `project` (String) Project name.
- `slo` (String) SLO name.
- `weight` (Number) Weights determine each component’s contribution to the composite SLO.
- `when_delayed` (String) Defines how to treat missing component data on `max_delay` expiry.





<a id="nestedblock--objective--count_metrics"></a>
### Nested Schema for `objective.count_metrics`

Required:

- `incremental` (Boolean) Should the metrics be incrementing or not
- `total` (Block Set, Min: 1) Configuration for metric source (see [below for nested schema](#nestedblock--objective--count_metrics--total))
- `incremental` (Boolean) Should the metrics be incrementing or not.
- `total` (Block Set, Min: 1) Configuration for metric source. (see [below for nested schema](#nestedblock--objective--count_metrics--total))

Optional:

Expand Down Expand Up @@ -1265,7 +1293,7 @@ Required:

Required:

- `query` (Block Set, Min: 1) Configuration for metric source (see [below for nested schema](#nestedblock--objective--raw_metric--query))
- `query` (Block Set, Min: 1) Configuration for metric source. (see [below for nested schema](#nestedblock--objective--raw_metric--query))

<a id="nestedblock--objective--raw_metric--query"></a>
### Nested Schema for `objective.raw_metric.query`
Expand Down Expand Up @@ -1623,25 +1651,25 @@ Required:

Required:

- `count` (Number) Count of the time unit
- `unit` (String) Unit of time
- `count` (Number) Count of the time unit.
- `unit` (String) Unit of time.

Optional:

- `calendar` (Block Set) Alert Policies attached to SLO (see [below for nested schema](#nestedblock--time_window--calendar))
- `is_rolling` (Boolean) Is the window moving or not
- `calendar` (Block Set) Alert Policies attached to SLO. (see [below for nested schema](#nestedblock--time_window--calendar))
- `is_rolling` (Boolean) Is the window moving or not.

Read-Only:

- `period` (Map of String) Period between start time and added count
- `period` (Map of String) Period between start time and added count.

<a id="nestedblock--time_window--calendar"></a>
### Nested Schema for `time_window.calendar`

Required:

- `start_time` (String) Date of the start
- `time_zone` (String) Timezone name in IANA Time Zone Database
- `start_time` (String) Date of the start.
- `time_zone` (String) Timezone name in IANA Time Zone Database.



Expand Down Expand Up @@ -1675,7 +1703,7 @@ Required:

Required:

- `url` (String) URL to the attachment
- `url` (String) URL to the attachment.

Optional:

Expand All @@ -1687,7 +1715,7 @@ Optional:

Required:

- `url` (String) URL to the attachment
- `url` (String) URL to the attachment.

Optional:

Expand All @@ -1699,7 +1727,7 @@ Optional:

Required:

- `target` (Number) Designated value
- `target` (Number) Designated value.

Optional:

Expand All @@ -1710,11 +1738,24 @@ Optional:

Required:

- `op` (String) Type of logical operation
- `op` (String) Type of logical operation.
- `value` (Number) Burn rate value.



<a id="nestedblock--indicator"></a>
### Nested Schema for `indicator`

Required:

- `name` (String) Name of the metric source (agent).

Optional:

- `kind` (String) Kind of the metric source. One of {Agent, Direct}.
- `project` (String) Name of the metric source project.


<a id="nestedblock--label"></a>
### Nested Schema for `label`

Expand Down
Loading

0 comments on commit 3f72ccf

Please sign in to comment.