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
Copy file name to clipboardExpand all lines: docs/guides/ha-pair-handling.md
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,3 +72,39 @@ distributor:
72
72
For further configuration file documentation, see the [distributor section](../configuration/config-file-reference.md#distributor_config) and [Ring/HA Tracker Store](../configuration/arguments.md#ringha-tracker-store).
73
73
74
74
For flag configuration, see the [distributor flags](../configuration/arguments.md#ha-tracker) having `ha-tracker` in them.
75
+
76
+
## Remote Read
77
+
78
+
If you plan to use remote_read, you can't have the `__replica__` label in the
79
+
external section. Instead, you will need to add it only on the remote_write
80
+
section of your prometheus.yml.
81
+
82
+
```
83
+
global:
84
+
external_labels:
85
+
cluster: prom-team1
86
+
remote_write:
87
+
- url: https://cortex/api/v1/push
88
+
write_relabel_configs:
89
+
- target_label: __replica__
90
+
replacement: 1
91
+
```
92
+
93
+
and
94
+
95
+
```
96
+
global:
97
+
external_labels:
98
+
cluster: prom-team1
99
+
remote_write:
100
+
- url: https://cortex/api/v1/push
101
+
write_relabel_configs:
102
+
- target_label: __replica__
103
+
replacement: replica2
104
+
```
105
+
106
+
When Prometheus is executing remote read queries, it will add the external
107
+
labels to the query. In this case, if it asks for the `__replica__` label,
108
+
Cortex will not return any data.
109
+
110
+
Therefore, the `__replica__` label should only be added for remote write.
0 commit comments