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 13, 2024
1 parent 23d58cf commit 238f991
Show file tree
Hide file tree
Showing 6 changed files with 40 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
8 changes: 8 additions & 0 deletions config/crd/bases/operator.victoriametrics.com_vmagents.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,10 @@ 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
Expand Down Expand Up @@ -2126,6 +2130,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
8 changes: 8 additions & 0 deletions config/crd/bases/operator.victoriametrics.com_vmsingles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,10 @@ 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.
Expand Down Expand Up @@ -911,6 +915,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 @@ -16,6 +16,8 @@ aliases:

## Next release

- [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 238f991

Please sign in to comment.