Skip to content

Commit 05b14ec

Browse files
weecocsmarchbanks
authored andcommitted
Clarify HA options for prometheus config (#1687)
* Clarify HA options for prometheus config * Escape markdown for __replica__ default value Signed-off-by: unknown <[email protected]>
1 parent 5e61a35 commit 05b14ec

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

docs/arguments.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,16 @@ HA tracking has two of it's own flags:
144144
- `distributor.ha-tracker.cluster`
145145
Prometheus label to look for in samples to identify a Prometheus HA cluster. (default "cluster")
146146
- `distributor.ha-tracker.replica`
147-
Prometheus label to look for in samples to identify a Prometheus HA replica. (default "__replica__")
147+
Prometheus label to look for in samples to identify a Prometheus HA replica. (default "`__replica__`")
148148

149-
It's reasonable to assume people probably already have a `cluster` label, or something similar. If not, they should add one along with `__replica__`
150-
via external labels in their Prometheus config.
149+
It's reasonable to assume people probably already have a `cluster` label, or something similar. If not, they should add one along with `__replica__` via external labels in their Prometheus config. If you stick to these default values your Prometheus config could look like this (`POD_NAME` is an environment variable which must be set by you):
150+
151+
```yaml
152+
global:
153+
external_labels:
154+
cluster: clustername
155+
__replica__: $POD_NAME
156+
```
151157
152158
HA Tracking looks for the two labels (which can be overwritten per user)
153159

0 commit comments

Comments
 (0)