Skip to content

Commit

Permalink
vmsingle and vmagent: keep_input for streaming aggregation
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Aug 16, 2024
1 parent 64879fb commit 5a82e0e
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/operator/v1beta1/vmextra_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,9 @@ type StreamAggrRule struct {
// +optional
IgnoreOldSamples *bool `json:"ignore_old_samples,omitempty" yaml:"ignore_old_samples,omitempty"`

// KeepInput instructs whether to keep all the matched input samples after the aggregation
KeepInput *bool `json:"keep_input,omitempty" yaml:"keep_input,omitempty"`

// By is an optional list of labels for grouping input series.
//
// See also Without.
Expand Down
5 changes: 5 additions & 0 deletions api/operator/v1beta1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions config/crd/overlay/crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3291,6 +3291,10 @@ spec:
interval:
description: Interval is the interval between aggregations.
type: string
keep_input:
description: KeepInput instructs whether to keep all
the matched input samples after the aggregation
type: boolean
keep_metric_names:
description: KeepMetricNames instructs to leave metric
names as is for the output time series without adding
Expand Down Expand Up @@ -5090,6 +5094,10 @@ spec:
interval:
description: Interval is the interval between aggregations.
type: string
keep_input:
description: KeepInput instructs whether to keep all the
matched input samples after the aggregation
type: boolean
keep_metric_names:
description: KeepMetricNames instructs to leave metric names
as is for the output time series without adding any suffix.
Expand Down Expand Up @@ -28534,6 +28542,10 @@ spec:
interval:
description: Interval is the interval between aggregations.
type: string
keep_input:
description: KeepInput instructs whether to keep all the
matched input samples after the aggregation
type: boolean
keep_metric_names:
description: KeepMetricNames instructs to leave metric names
as is for the output time series without adding any suffix.
Expand Down
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ aliases:

- [vmscrapeconfig](https://docs.victoriametrics.com/operator/api#vmscrapeconfig) - added `max_scrape_size` parameter for scrape protocols configuration

- [vmagent](./api.md#vmagent) and [vmsingle](./api.md#vmsingle): adds new fields into `streamAggrConfig`: `keep_input`.

<a name="v0.45.0"></a>

## [v0.45.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.45.0) - 10 Jun 2024
Expand Down
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1857,6 +1857,7 @@ _Appears in:_
| `ignore_old_samples` | IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval. | _boolean_ | false |
| `input_relabel_configs` | InputRelabelConfigs is an optional relabeling rules, which are applied on the input<br />before aggregation. | _[RelabelConfig](#relabelconfig) array_ | false |
| `interval` | Interval is the interval between aggregations. | _string_ | true |
| `keep_input` | KeepInput instructs whether to keep all the matched input samples after the aggregation | _boolean_ | true |
| `keep_metric_names` | KeepMetricNames instructs to leave metric names as is for the output time series without adding any suffix. | _boolean_ | false |
| `match` | Match is a label selector (or list of label selectors) for filtering time series for the given selector.<br /><br />If the match isn't set, then all the input time series are processed. | _[StringOrArray](#stringorarray)_ | false |
| `no_align_flush_to_interval` | NoAlignFlushToInterval disables aligning of flushes to multiples of Interval.<br />By default flushes are aligned to Interval. | _boolean_ | false |
Expand Down

0 comments on commit 5a82e0e

Please sign in to comment.