-
Notifications
You must be signed in to change notification settings - Fork 820
Add documentation for HA tracker flags. #1465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f2c24e7
d04172f
c05b51f
b8d4b6d
62eec4b
98303a8
edf7e8a
617e325
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,6 +92,67 @@ The ingester query API was improved over time, but defaults to the old behaviour | |
- `-distributor.extra-query-delay` | ||
This is used by a component with an embedded distributor (Querier and Ruler) to control how long to wait until sending more than the minimum amount of queries needed for a successful response. | ||
|
||
- `distributor.ha-tracker.enable-for-all-users` | ||
Flag to enable, for all users, handling of samples with external labels identifying replicas in an HA Prometheus setup. This defaults to false, and is technically defined in the Distributor limits. | ||
|
||
- `distributor.ha-tracker.enable` | ||
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. | ||
|
||
### Ring/HA Tracker Store | ||
|
||
The KVStore client is used by both the Ring and HA Tracker. | ||
- `{ring,distributor.ha-tracker}.prefix` | ||
The prefix for the keys in the store. Should end with a /. For example with a prefix of foo/, the key bar would be stored under foo/bar. | ||
- `{ring,distributor.ha-tracker}.store` | ||
Backend storage to use for the ring (consul, etcd, inmemory). | ||
|
||
#### Consul | ||
|
||
By default these flags are used to configure Consul used for the ring. To configure Consul for the HA tracker, | ||
prefix these flags with `distributor.ha-tracker.` | ||
|
||
- `consul.hostname` | ||
Hostname and port of Consul. | ||
- `consul.acltoken` | ||
ACL token used to interact with Consul. | ||
- `consul.client-timeout` | ||
HTTP timeout when talking to Consul. | ||
- `consul.consistent-reads` | ||
Enable consistent reads to Consul. | ||
|
||
#### etcd | ||
|
||
By default these flags are used to configure etcd used for the ring. To configure etcd for the HA tracker, | ||
prefix these flags with `distributor.ha-tracker.` | ||
|
||
- `etcd.endpoints` | ||
The etcd endpoints to connect to. | ||
- `etcd.dial-timeout` | ||
The timeout for the etcd connection. | ||
- `etcd.max-retries` | ||
The maximum number of retries to do for failed ops. | ||
|
||
### HA Tracker | ||
|
||
HA tracking has two of it's own flags: | ||
- `distributor.ha-tracker.cluster` | ||
Prometheus label to look for in samples to identify a Prometheus HA cluster. (default "cluster") | ||
- `distributor.ha-tracker.replica` | ||
Prometheus label to look for in samples to identify a Prometheus HA replica. (default "__replica__") | ||
|
||
It's reasonable to assume people probably already have a `cluster` label, or something similar. If not, they should add one along with `__replica__` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't use external labels in our prometheus config, as each prometheus gets a different UserID / TenantID. Does Cortex still require the "cluster" external label then if I only have one prometheus cluster per tenant or does it use the default "cluster" if no label is specified? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both labels have to be present for Cortex to dedup samples from HA prometheus instances. Whether the labels are already in your series or added via external labels doesn't matter. Cortex just needs a way of identifying each HA cluster, and each replica within that cluster. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Assuming I am just about to enable the HA tracker feature and I have a single prometheus instance for each tenant/user ID which does not set either of these two labels. Does this cause any problems, will it reject samples without these labels? |
||
via external labels in their Prometheus config. | ||
|
||
HA Tracking looks for the two labels (which can be overwritten per user) | ||
|
||
It also talks to a KVStore and has it's own copies of the same flags used by the Distributor to connect to for the ring. | ||
- `distributor.ha-tracker.failover-timeout` | ||
If we don't receive any samples from the accepted replica for a cluster in this amount of time we will failover to the next replica we receive a sample from. This value must be greater than the update timeout (default 30s) | ||
- `distributor.ha-tracker.store` | ||
Backend storage to use for the ring (consul, etcd, inmemory). (default "consul") | ||
- `distributor.ha-tracker.update-timeout` | ||
Update the timestamp in the KV store for a given cluster/replica only after this amount of time has passed since the current stored timestamp. (default 15s) | ||
|
||
## Ingester | ||
|
||
- `-ingester.normalise-tokens` | ||
|
@@ -185,4 +246,4 @@ Valid fields are (with their corresponding flags for default values): | |
|
||
- `s3.force-path-style` | ||
|
||
Set this to `true` to force the request to use path-style addressing (`http://s3.amazonaws.com/BUCKET/KEY`). By default, the S3 client will use virtual hosted bucket addressing when possible (`http://BUCKET.s3.amazonaws.com/KEY`). | ||
Set this to `true` to force the request to use path-style addressing (`http://s3.amazonaws.com/BUCKET/KEY`). By default, the S3 client will use virtual hosted bucket addressing when possible (`http://BUCKET.s3.amazonaws.com/KEY`). |
Uh oh!
There was an error while loading. Please reload this page.