diff --git a/docs/configuration/arguments.md b/docs/configuration/arguments.md index fa32ba010e2..a9d2a058ad9 100644 --- a/docs/configuration/arguments.md +++ b/docs/configuration/arguments.md @@ -377,7 +377,7 @@ Valid per-tenant limits are (with their corresponding flags for default values): - `reject_old_samples_max_age` / `-validation.reject-old-samples.max-age` - `creation_grace_period` / `-validation.create-grace-period` - Also enforced by the distributor; limits on how far in the past (and future) timestamps that we accept can be. + Enforced by the distributor before samples are forwarded to ingesters; limits on how far in the past (and future) accepted timestamps can be. If ingesters reject late samples because they are older than the TSDB head minimum time, configure `out_of_order_time_window` / `-ingester.out-of-order-time-window` on ingesters. - `max_series_per_user` / `-ingester.max-series-per-user` - `max_series_per_metric` / `-ingester.max-series-per-metric` diff --git a/docs/configuration/config-file-reference.md b/docs/configuration/config-file-reference.md index c560a6d17d1..c1590e3caf0 100644 --- a/docs/configuration/config-file-reference.md +++ b/docs/configuration/config-file-reference.md @@ -4412,11 +4412,11 @@ The `limits_config` configures default and per-tenant limits imposed by Cortex s # CLI flag: -validation.max-metadata-length [max_metadata_length: | default = 1024] -# Reject old samples. +# Reject old samples at the distributor before forwarding them to ingesters. # CLI flag: -validation.reject-old-samples [reject_old_samples: | default = false] -# Maximum accepted sample age before rejecting. +# Maximum accepted sample age before rejecting at the distributor. # CLI flag: -validation.reject-old-samples.max-age [reject_old_samples_max_age: | default = 2w] @@ -4550,8 +4550,9 @@ The `limits_config` configures default and per-tenant limits imposed by Cortex s # CLI flag: -ingester.max-global-metadata-per-metric [max_global_metadata_per_metric: | default = 0] -# [Experimental] Configures the allowed time window for ingestion of -# out-of-order samples. Disabled (0s) by default. +# [Experimental] Configures the ingester TSDB window for out-of-order samples. +# Use this to tolerate late samples that are older than the TSDB head minimum +# time. Disabled (0s) by default. # CLI flag: -ingester.out-of-order-time-window [out_of_order_time_window: | default = 0s] diff --git a/pkg/util/validation/limits.go b/pkg/util/validation/limits.go index 019a5adc3ed..2d4385e3568 100644 --- a/pkg/util/validation/limits.go +++ b/pkg/util/validation/limits.go @@ -295,9 +295,9 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { f.IntVar(&l.MaxLabelsSizeBytes, "validation.max-labels-size-bytes", 0, "Maximum combined size in bytes of all labels and label values accepted for a series. 0 to disable the limit.") f.IntVar(&l.MaxNativeHistogramSampleSizeBytes, "validation.max-native-histogram-sample-size-bytes", 0, "Maximum size in bytes of a native histogram sample. 0 to disable the limit.") f.IntVar(&l.MaxMetadataLength, "validation.max-metadata-length", 1024, "Maximum length accepted for metric metadata. Metadata refers to Metric Name, HELP and UNIT.") - f.BoolVar(&l.RejectOldSamples, "validation.reject-old-samples", false, "Reject old samples.") + f.BoolVar(&l.RejectOldSamples, "validation.reject-old-samples", false, "Reject old samples at the distributor before forwarding them to ingesters.") _ = l.RejectOldSamplesMaxAge.Set("14d") - f.Var(&l.RejectOldSamplesMaxAge, "validation.reject-old-samples.max-age", "Maximum accepted sample age before rejecting.") + f.Var(&l.RejectOldSamplesMaxAge, "validation.reject-old-samples.max-age", "Maximum accepted sample age before rejecting at the distributor.") _ = l.CreationGracePeriod.Set("10m") f.Var(&l.CreationGracePeriod, "validation.create-grace-period", "Duration which table will be created/deleted before/after it's needed; we won't accept sample from before this time.") f.BoolVar(&l.EnforceMetricName, "validation.enforce-metric-name", true, "Enforce every sample has a metric name.") @@ -317,7 +317,7 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { f.IntVar(&l.MaxGlobalNativeHistogramSeriesPerUser, "ingester.max-global-native-histogram-series-per-user", 0, "The maximum number of active native histogram series per user, across the cluster before replication. 0 to disable. Supported only if -distributor.shard-by-all-labels and ingester.active-series-metrics-enabled is true.") f.BoolVar(&l.EnableNativeHistograms, "blocks-storage.tsdb.enable-native-histograms", false, "[EXPERIMENTAL] True to enable native histogram.") f.IntVar(&l.MaxExemplars, "ingester.max-exemplars", 0, "Enables support for exemplars in TSDB and sets the maximum number that will be stored. less than zero means disabled. If the value is set to zero, cortex will fallback to blocks-storage.tsdb.max-exemplars value.") - f.Var(&l.OutOfOrderTimeWindow, "ingester.out-of-order-time-window", "[Experimental] Configures the allowed time window for ingestion of out-of-order samples. Disabled (0s) by default.") + f.Var(&l.OutOfOrderTimeWindow, "ingester.out-of-order-time-window", "[Experimental] Configures the ingester TSDB window for out-of-order samples. Use this to tolerate late samples that are older than the TSDB head minimum time. Disabled (0s) by default.") f.IntVar(&l.MaxLocalMetricsWithMetadataPerUser, "ingester.max-metadata-per-user", 8000, "The maximum number of active metrics with metadata per user, per ingester. 0 to disable.") f.IntVar(&l.MaxLocalMetadataPerMetric, "ingester.max-metadata-per-metric", 10, "The maximum number of metadata per metric, per ingester. 0 to disable.")