Skip to content

Commit 7df8ab1

Browse files
docs: Update HA tracker docs to use memberlist by default (#13002)
1 parent c2a18bc commit 7df8ab1

File tree

11 files changed

+61
-48
lines changed

11 files changed

+61
-48
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156

157157
* [CHANGE] Remove references to queriers having a Prometheus HTTP API. Instead, the query-frontend is now required for a Prometheus HTTP API. #12949
158158
* [CHANGE] Helm: Remove GEM (Grafana Enterprise Metrics) references from Helm chart documentation. #13019 #13020 #13021
159+
* [CHANGE] Update HA tracker documentation to use memberlist as the default KV store instead of consul/etcd. Consul and etcd are now marked as deprecated for the HA tracker as of Mimir 3.0. #13002
159160
* [ENHANCEMENT] Add migration guide for HA tracker from Consul or etcd to memberlist. #13011
160161
* [ENHANCEMENT] Improve the MimirIngesterReachingSeriesLimit runbook. #12356
161162
* [ENHANCEMENT] Improve the description of how to limit the number of buckets in native histograms. #12797

docs/sources/helm-charts/mimir-distributed/run-production-environment-with-helm/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ If you need redundancy on the write path before it reaches Mimir, then you
337337
can set up redundant instances of Prometheus or Grafana Alloy to
338338
write metrics to Mimir.
339339

340-
For more information, see [Configure high-availability deduplication with Consul](configure-helm-ha-deduplication-consul/).
340+
For more information, refer to [Configure high-availability deduplication](configure-helm-ha-deduplication/).
341341

342342
## Deploy on OpenShift
343343

Loading
Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,38 @@ aliases:
33
- ../configuring/configure-helm-ha-deduplication-consul/
44
description:
55
Learn how to configure the Grafana Mimir Helm chart to handle HA Prometheus
6-
server deduplication with Consul.
7-
menuTitle: Configure high-availability deduplication with Consul
8-
title:
9-
Configuring Grafana Mimir-Distributed Helm Chart for high-availability deduplication
10-
with Consul
6+
server deduplication.
7+
menuTitle: Configure high-availability deduplication
8+
title: Configure high-availability deduplication with the Mimir distributed Helm chart
119
weight: 70
1210
---
1311

14-
# Configuring Grafana Mimir-Distributed Helm Chart for high-availability deduplication with Consul
12+
# Configure high-availability deduplication with the Mimir distributed Helm chart
1513

16-
Grafana Mimir can deduplicate data from a high-availability (HA) Prometheus setup. You can configure
17-
the deduplication by using the Grafana Mimir helm chart deployment that uses external Consul. For more information, see [Configure high availability](https://grafana.com/docs/mimir/<MIMIR_VERSION>/configure/configure-high-availability-deduplication/).
14+
Grafana Mimir can deduplicate data from a high-availability (HA) Prometheus setup. Starting from Mimir 3.0, the HA tracker uses `memberlist` by default, which requires no external dependencies. For more information, see [Configure high availability](https://grafana.com/docs/mimir/<MIMIR_VERSION>/configure/configure-high-availability-deduplication/).
15+
16+
{{< admonition type="note" >}}
17+
Prior to Mimir 3.0, the HA tracker required an external key-value store such as Consul or etcd. These backends are now deprecated. If you're currently using Consul or etcd for the HA tracker, refer to the migration guide.
18+
{{< /admonition >}}
1819

1920
## Before you begin
2021

2122
You need to have a Grafana Mimir installed via the mimir-distributed Helm chart.
2223

2324
For conceptual information about how Mimir deduplicates incoming HA samples, refer to [Configure high availability](https://grafana.com/docs/mimir/<MIMIR_VERSION>/configure/configure-high-availability-deduplication/).
2425

25-
You also need to configure HA for Prometheus or Grafana Agent. Lastly, you need a key-value store such as Consul KV.
26+
You also need to configure HA for Prometheus or Grafana Alloy.
2627

2728
{{< docs/shared source="alloy" lookup="agent-deprecation.md" version="next" >}}
2829

29-
## Configure Prometheus or Grafana Agent to send HA external labels
30+
## Configure Prometheus or Grafana Alloy to send HA external labels
3031

31-
Configure the Prometheus or Grafana Agent HA setup by setting the labels named `cluster` and `__replica__`,
32+
Configure the Prometheus or Grafana Alloy HA setup by setting the labels named `cluster` and `__replica__`,
3233
which are the default labels for a HA setup in Grafana Mimir. If you want to change the HA labels,
33-
make sure to change them in Mimir as well. This ensures that the configurations of Grafana Mimir, Prometheus, and Grafana Agent all match each other. Otherwise, HA deduplication will not work.
34+
make sure to change them in Mimir as well. This ensures that the configurations of Grafana Mimir, Prometheus, and Grafana Alloy all match each other. Otherwise, HA deduplication will not work.
3435

35-
- The value of the `cluster` label must be same across replica that belong to the same cluster.
36-
- The value of the `__replica__` label must be unique across different replica within the same cluster.
36+
- The value of the `cluster` label must be same across replicas that belong to the same cluster.
37+
- The value of the `__replica__` label must be unique across replicas within the same cluster.
3738

3839
```yaml
3940
global:
@@ -42,15 +43,9 @@ global:
4243
cluster: my-prometheus
4344
```
4445
45-
Reload or restart Prometheus or Grafana Agent after you update the configuration.
46-
47-
> **Note:** [Configure high availability](https://grafana.com/docs/mimir/<MIMIR_VERSION>/configure/configure-high-availability-deduplication/).
48-
> document contains the same information on Prometheus setup for HA dedup.
49-
50-
## Install Consul using Helm
46+
Reload or restart Prometheus or Grafana Alloy after you update the configuration.
5147
52-
To get and install Consul on Kubernetes, use the [Consul helm chart](https://github.com/hashicorp/consul-k8s/tree/main/charts/consul).
53-
Make a note of the Consul endpoint, because you will need it later to configure Mimir.
48+
> **Note:** [Configure high availability](https://grafana.com/docs/mimir/<MIMIR_VERSION>/configure/configure-high-availability-deduplication/) contains the same information on Prometheus setup for HA deduplication.
5449
5550
## Configure Mimir high availability
5651
@@ -75,12 +70,14 @@ mimir:
7570
ha_tracker:
7671
enable_ha_tracker: true
7772
kvstore:
78-
store: consul
79-
consul:
80-
host: <consul-endpoint> # example: http://consul.consul.svc.cluster.local:8500
73+
store: memberlist
8174
```
8275

83-
2. Upgrade the Mimir's helm release using the following command:
76+
{{< admonition type="note" >}}
77+
If memberlist is already configured for other Mimir components (such as the hash ring), the HA tracker will automatically use that configuration. In most Helm deployments, memberlist is already configured, so no additional configuration is needed.
78+
{{< /admonition >}}
79+
80+
2. Upgrade the Mimir Helm release using the following command:
8481

8582
```bash
8683
helm -n <mimir-namespace> upgrade mimir grafana/mimir-distributed -f custom.yaml
@@ -105,9 +102,7 @@ mimir:
105102
ha_tracker:
106103
enable_ha_tracker: true
107104
kvstore:
108-
store: consul
109-
consul:
110-
host: <consul-endpoint> # example: http://consul.consul.svc.cluster.local:8500
105+
store: memberlist
111106
runtimeConfig:
112107
overrides:
113108
<tenant-id>: # put real tenant ID here
@@ -116,8 +111,8 @@ runtimeConfig:
116111
ha_replica_label: __replica__
117112
```
118113

119-
The `mimir` configuration block is similar with Globally configure HA deduplication setup. The `runtimeConfig` block
120-
is the configuration for per tenant HA deduplication.
114+
The `mimir` configuration block is similar to the global HA deduplication configuration. The `runtimeConfig` block
115+
configures per-tenant HA deduplication.
121116

122117
2. Upgrade the Mimir's helm release using the following command:
123118

@@ -127,7 +122,7 @@ is the configuration for per tenant HA deduplication.
127122

128123
## Verifying deduplication
129124

130-
After Consul, Prometheus and Mimir running we can verify deduplication in several way.
125+
After Prometheus and Mimir are running, you can verify deduplication in several ways.
131126

132127
### ha_tracker's page
133128

docs/sources/mimir/configure/about-versioning.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,6 @@ The following features are currently experimental:
107107
- `-distributor.otel-created-timestamp-zero-ingestion-enabled`
108108
- Promote a certain set of OTel resource attributes to labels
109109
- `-distributor.otel-promote-resource-attributes`
110-
- Add experimental `memberlist` key-value store for ha_tracker. Note that this feature is `experimental`, as the upper limits of propagation times have not yet been validated. Additionally, cleanup operations have not yet been implemented for the memberlist entries.
111-
- `-distributor.ha-tracker.kvstore.store`
112110
- Allow keeping OpenTelemetry `service.instance.id`, `service.name` and `service.namespace` resource attributes in `target_info` on top of converting them to the `instance` and `job` labels.
113111
- `-distributor.otel-keep-identifying-resource-attributes`
114112
- Enable conversion of OTel explicit bucket histograms into native histograms with custom buckets.
@@ -312,5 +310,6 @@ The following features or configuration parameters are currently deprecated and
312310
- Rule group configuration file
313311
- `evaluation_delay` field: use `query_offset` instead
314312
- The `-store-gateway.sharding-ring.auto-forget-enabled` is deprecated and will be removed in a future release. Set the `-store-gateway.sharding-ring.auto-forget-unhealthy-periods` flag to 0 to disable the auto-forget feature. Deprecated since Mimir 2.17.
315-
- etcd is deprecated as an option for backend storage for the HA tracker since Mimir 2.17.
313+
- Consul and etcd are deprecated as backend storage options for the HA tracker as of Mimir 3.0.
314+
- Use `memberlist` instead. Refer to the migration guide for instructions on migrating from Consul or etcd to `memberlist` for the HA tracker.
316315
- The `-distributor.otel-start-time-quiet-zero` parameter no longer has any effect and will be removed in a future release. Deprecated since Mimir 2.18.

docs/sources/mimir/configure/configure-high-availability-deduplication.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,20 @@ Alternatively, you can enable the HA tracker only on a per-tenant basis, keeping
106106
#### Configure the HA tracker KV store
107107

108108
The HA tracker requires a key-value (KV) store to coordinate which replica is currently elected.
109-
In [Grafana Mimir versions 2.17](https://github.com/grafana/mimir/releases/tag/mimir-2.17.0) and later, use `memberlist` as the KV store backend for the HA tracker. The `consul` and `etcd` backends are deprecated.
109+
Starting from Mimir 3.0, `memberlist` is the recommended and default KV store backend for the HA tracker.
110+
111+
{{< admonition type="note" >}}
112+
The `consul` and `etcd` backends are deprecated as of Mimir 3.0. If you're currently using `consul` or `etcd` for the HA tracker, refer to the migration guide for instructions on migrating to `memberlist`.
113+
{{< /admonition >}}
110114

111115
To migrate from Consul or etcd to memberlist without downtime, see [Migrate HA tracker from Consul or etcd to memberlist](migrate-ha-tracker-to-memberlist/).
112116

113117
The following CLI flags (and their respective YAML configuration options) are available for configuring the HA tracker KV store:
114118

115-
- `-distributor.ha-tracker.store`: The backend storage to use, which is `memberlist`. The `consul` and `etcd` backends are deprecated.
116-
- `-memberlist.*`: The memberlist client configuration. It's common and used by other Mimir components as well.
117-
- [deprecated]`-distributor.ha-tracker.consul.*`: The Consul client configuration. Only use this if you have defined `consul` as your backend storage.
118-
- [deprecated]`-distributor.ha-tracker.etcd.*`: The etcd client configuration. Only use this if you have defined `etcd` as your backend storage.
119+
- `-distributor.ha-tracker.store`: Backend storage to use (default: `memberlist`).
120+
- `-memberlist.*`: Memberlist client configuration. This is shared by multiple components.
121+
122+
The memberlist configuration is typically shared across multiple Mimir components (distributors, ingesters, etc.), so if you already have memberlist configured for hash ring synchronization, no additional configuration is required for the HA tracker.
119123

120124
#### Configure expected label names for each Prometheus cluster and replica
121125

@@ -138,12 +142,22 @@ The following configuration example snippet enables the HA tracker for all tenan
138142
```yaml
139143
limits:
140144
accept_ha_samples: true
145+
141146
distributor:
142147
ha_tracker:
143148
enable_ha_tracker: true
144149
kvstore:
145-
[store: <string> | default = "consul"]
146-
[consul | etcd: <config>]
150+
store: memberlist
151+
152+
memberlist:
153+
# Memberlist configuration (typically shared with other components)
154+
join_members:
155+
- <IP_OR_DNS:PORT>
156+
- <IP_OR_DNS:PORT>
147157
```
148158
159+
{{< admonition type="note" >}}
160+
If memberlist is already configured for other Mimir components, such as the hash ring, the HA tracker automatically uses that configuration. In most deployments, you don't need any additional memberlist configuration.
161+
{{< /admonition >}}
162+
149163
For more information, see [distributor](../configuration-parameters/#distributor). The HA tracker flags are prefixed with `-distributor.ha-tracker.*`.

docs/sources/mimir/manage/mimir-runbooks/_index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,14 +1244,14 @@ When using Memberlist as KV store for hash rings, all read and update operations
12441244
How it **works**:
12451245
12461246
- Consul is typically used to store the hash ring state.
1247-
- Etcd is typically used to store by the HA tracker (distributor) to deduplicate samples.
1247+
- Memberlist (default since Mimir 3.0) or etcd/Consul (deprecated) are used by the HA tracker (distributor) to deduplicate samples.
12481248
- If an instance is failing operations on the **hash ring**, either the instance can't update the heartbeat in the ring or is failing to receive ring updates.
12491249
- If an instance is failing operations on the **HA tracker** backend, either the instance can't update the authoritative replica or is failing to receive updates.
12501250
12511251
How to **investigate**:
12521252
1253-
- Ensure Consul/Etcd is up and running.
1254-
- Investigate the logs of the affected instance to find the specific error occurring when talking to Consul/Etcd.
1253+
- Ensure the KV store backend (Consul, etcd, or memberlist) is up and running.
1254+
- Investigate the logs of the affected instance to find the specific error occurring when talking to the KV store backend.
12551255
12561256
### MimirReachingTCPConnectionsLimit
12571257

docs/sources/mimir/manage/secure/securing-communications-with-tls.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ The following Grafana Mimir components support TLS for inter-communication, whic
143143
- Distributor gRPC client used to forward series matching a configured set to a dedicated remote endpoint: `-distributor.forwarding.grpc-client.*`
144144
- Alertmanager gRPC client used to connect to other Alertmanager instances: `-alertmanager.alertmanager-client.*`
145145
- gRPC client used by distributors, queriers, and rulers to connect to ingesters: `-ingester.client.*`
146-
- etcd client used by all Mimir components to connect to etcd, which is required only if you're running the hash ring or HA tracker on the etcd backend: `-<prefix>.etcd.*`
147-
- Memberlist client used by all Mimir components to gossip the hash ring, which is required only if you're running the hash ring on memberlist: `-memberlist.`
146+
- etcd client used by all Mimir components to connect to etcd (deprecated for HA tracker as of Mimir 3.0; use memberlist instead): `-<prefix>.etcd.*`
147+
- Memberlist client used by all Mimir components to gossip the hash ring and HA tracker: `-memberlist.`
148148
- Memcached client used by all Mimir components: `-blocks-storage.bucket-store.chunks-cache.memcached.*`, `-blocks-storage.bucket-store.index-cache.memcached.*`, `-blocks-storage.bucket-store.metadata-cache.memcached.*`, `-query-frontend.results-cache.memcached.*`, `-ruler-storage.cache.memcached.*`
149149

150150
Each of the components listed above support the following TLS configuration options, which are shown with their corresponding flag suffixes:

0 commit comments

Comments
 (0)