You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a limits config option to allow for dropping of the cluster label (#1726)
* Rename removeReplicaLabel to more generic removeLabel.
Signed-off-by: Callum Styan <[email protected]>
* Refactor Push; move some logic into another function validateSeries for
testability.
Signed-off-by: Callum Styan <[email protected]>
* Add a per user option to remove cluster label when ingesting HA samples
in Distributor.
Signed-off-by: Callum Styan <[email protected]>
* Make label dropping generic instead of cluster label/HA tracker
specific.
Signed-off-by: Callum Styan <[email protected]>
* review comments; fix some comments, more descriptive var name, check for
empty labels after dropping labels
Signed-off-by: Callum Styan <[email protected]>
Copy file name to clipboardExpand all lines: docs/arguments.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -108,6 +108,9 @@ The ingester query API was improved over time, but defaults to the old behaviour
108
108
-`distributor.ha-tracker.enable`
109
109
Enable the distributors HA tracker so that it can accept samples from Prometheus HA replicas gracefully (requires labels). Global (for distributors), this ensures that the necessary internal data structures for the HA handling are created. The option `enable-for-all-users` is still needed to enable ingestion of HA samples for all users.
110
110
111
+
-`distributor.drop-label`
112
+
This flag can be used to specify label names that to drop during sample ingestion within the distributor and can be repeated in order to drop multiple labels.
113
+
111
114
### Ring/HA Tracker Store
112
115
113
116
The KVStore client is used by both the Ring and HA Tracker.
@@ -177,7 +180,7 @@ Flags for configuring KV store based on memberlist library. This feature is expe
177
180
178
181
### HA Tracker
179
182
180
-
HA tracking has two of it's own flags:
183
+
HA tracking has two of its own flags:
181
184
-`distributor.ha-tracker.cluster`
182
185
Prometheus label to look for in samples to identify a Prometheus HA cluster. (default "cluster")
f.Float64Var(&l.IngestionRate, "distributor.ingestion-rate-limit", 25000, "Per-user ingestion rate limit in samples per second.")
56
59
f.IntVar(&l.IngestionBurstSize, "distributor.ingestion-burst-size", 50000, "Per-user allowed ingestion burst size (in number of samples). Warning, very high limits will be reset every -distributor.limiter-reload-period.")
57
60
f.BoolVar(&l.AcceptHASamples, "distributor.ha-tracker.enable-for-all-users", false, "Flag to enable, for all users, handling of samples with external labels identifying replicas in an HA Prometheus setup.")
58
-
f.StringVar(&l.HAReplicaLabel, "distributor.ha-tracker.replica", "__replica__", "Prometheus label to look for in samples to identify a Prometheus HA replica.")
59
61
f.StringVar(&l.HAClusterLabel, "distributor.ha-tracker.cluster", "cluster", "Prometheus label to look for in samples to identify a Prometheus HA cluster.")
62
+
f.StringVar(&l.HAReplicaLabel, "distributor.ha-tracker.replica", "__replica__", "Prometheus label to look for in samples to identify a Prometheus HA replica.")
63
+
f.Var(&l.DropLabels, "distributor.drop-label", "This flag can be used to specify label names that to drop during sample ingestion within the distributor and can be repeated in order to drop multiple labels.")
60
64
f.IntVar(&l.MaxLabelNameLength, "validation.max-length-label-name", 1024, "Maximum length accepted for label names")
61
65
f.IntVar(&l.MaxLabelValueLength, "validation.max-length-label-value", 2048, "Maximum length accepted for label value. This setting also applies to the metric name")
62
66
f.IntVar(&l.MaxLabelNamesPerSeries, "validation.max-label-names-per-series", 30, "Maximum number of label names per series.")
0 commit comments