Skip to content

Commit

Permalink
vmsingle and vmagent: keep_input and ignore_first_samples for streami…
Browse files Browse the repository at this point in the history
…ng aggregation
  • Loading branch information
AndrewChubatiuk committed Jun 21, 2024
1 parent e9b2e9c commit f3d27d7
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions api/v1beta1/additional.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,12 @@ type StreamAggrRule struct {
// IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval.
IgnoreOldSamples *bool `json:"ignore_old_samples,omitempty" yaml:"ignore_old_samples,omitempty"`

// IgnoreFirstIntervals instructs to ignore first N intervals after start.
IgnoreFirstIntervals *int `json:"ignore_first_intervals,omitempty" yaml:"ignore_first_intervals,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
10 changes: 10 additions & 0 deletions api/v1beta1/zz_generated.deepcopy.go

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

6 changes: 6 additions & 0 deletions api/victoriametrics/v1beta1/additional.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,12 @@ type StreamAggrRule struct {
// IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval.
IgnoreOldSamples *bool `json:"ignore_old_samples,omitempty" yaml:"ignore_old_samples,omitempty"`

// IgnoreFirstIntervals instructs to ignore first N intervals after start.
IgnoreFirstIntervals *int `json:"ignore_first_intervals,omitempty" yaml:"ignore_first_intervals,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
6 changes: 6 additions & 0 deletions config/crd/bases/operator.victoriametrics.com_vmagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,9 @@ spec:
It is not recommended changing this setting, unless unfinished aggregations states
are preferred to missing data points.
type: boolean
ignore_first_intervals:
description: IgnoreFirstIntervals instructs to ignore first N intervals after start.
type: integer
ignore_old_samples:
description: IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval.
type: boolean
Expand Down Expand Up @@ -2001,6 +2004,9 @@ 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.
type: boolean
Expand Down
6 changes: 6 additions & 0 deletions config/crd/bases/operator.victoriametrics.com_vmsingles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,9 @@ spec:
It is not recommended changing this setting, unless unfinished aggregations states
are preferred to missing data points.
type: boolean
ignore_first_intervals:
description: IgnoreFirstIntervals instructs to ignore first N intervals after start.
type: integer
ignore_old_samples:
description: IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval.
type: boolean
Expand Down Expand Up @@ -882,6 +885,9 @@ 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.
type: boolean
Expand Down
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ aliases:

- [vmalertmanagerconfig](./api.md#vmalertmanagerconfig): adds missing `handleReconcileErr` callback to the reconcile loop. It must properly handle errors and deregister objects.

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

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

## [v0.45.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.45.0) - 10 Jun 2024
Expand Down

0 comments on commit f3d27d7

Please sign in to comment.