Skip to content

Commit 885737a

Browse files
committed
Tutorial : Downsampling and Unlimited Metric Retention for Prometheus.
Signed-off-by: soniasingla <[email protected]> Added Intro File Signed-off-by: soniasingla <[email protected]> Adding Initial Setup File Signed-off-by: soniasingla <[email protected]> Files : Initial Setup and Verification Signed-off-by: soniasingla <[email protected]> Initial prometheus servers Signed-off-by: soniasingla <[email protected]> Updating 3 prometheus to 2 prometheus Signed-off-by: soniasingla <[email protected]> Updating Step-2 and Verification Signed-off-by: soniasingla <[email protected]> bash file Signed-off-by: soniasingla <[email protected]> Update JSON file: Environment and files Signed-off-by: soniasingla <[email protected]> Details and verification Signed-off-by: soniasingla <[email protected]> Step3 Bash file Signed-off-by: soniasingla <[email protected]> script changes added Signed-off-by: soniasingla <[email protected]> Step 2: Verification updated Signed-off-by: soniasingla <[email protected]> Update in step 3 Signed-off-by: soniasingla <[email protected]> Nit improvements Signed-off-by: soniasingla <[email protected]> step 4 updated Signed-off-by: soniasingla <[email protected]> Updated Signed-off-by: soniasingla <[email protected]> Deployed Thanos Store Gateway Signed-off-by: soniasingla <[email protected]> Bash script as per step-3 Signed-off-by: soniasingla <[email protected]> No image error Signed-off-by: soniasingla <[email protected]> step 4, wohps Signed-off-by: soniasingla <[email protected]> step 4, wohps Signed-off-by: soniasingla <[email protected]> thanos quay Signed-off-by: soniasingla <[email protected]> thanos quay Signed-off-by: soniasingla <[email protected]> CE Signed-off-by: soniasingla <[email protected]> Changing 2 servers to 1 server Signed-off-by: soniasingla <[email protected]> Update in step-2 Signed-off-by: soniasingla <[email protected]> Update Prometheus version Signed-off-by: soniasingla <[email protected]> update bash Signed-off-by: soniasingla <[email protected]> add minio Signed-off-by: soniasingla <[email protected]> add minio Signed-off-by: soniasingla <[email protected]> add minio Signed-off-by: soniasingla <[email protected]> configuration path Signed-off-by: soniasingla <[email protected]> configuration added Signed-off-by: soniasingla <[email protected]> update docker container Signed-off-by: soniasingla <[email protected]> update docker container Signed-off-by: soniasingla <[email protected]> update docker container Signed-off-by: soniasingla <[email protected]> update store conatiner Signed-off-by: soniasingla <[email protected]> added description, removed in progress Signed-off-by: soniasingla <[email protected]> Add automation file Signed-off-by: soniasingla <[email protected]> Add automation file Signed-off-by: soniasingla <[email protected]> Add automation files Signed-off-by: soniasingla <[email protected]> Adding metrics path Signed-off-by: soniasingla <[email protected]> i did it Signed-off-by: soniasingla <[email protected]> Verification : Step-3 Signed-off-by: soniasingla <[email protected]> Remove double into Signed-off-by: soniasingla <[email protected]> grammarly fixes Signed-off-by: soniasingla <[email protected]> Thanos Compactor Signed-off-by: soniasingla <[email protected]> Thanos Compactor Signed-off-by: soniasingla <[email protected]> Configuration update, Added Thanos Querier, and TODO steps Signed-off-by: soniasingla <[email protected]> Fix comma error in step-4 Signed-off-by: soniasingla <[email protected]> Fix errors in step-4 Signed-off-by: soniasingla <[email protected]> nipticks Signed-off-by: soniasingla <[email protected]> update docker container Signed-off-by: soniasingla <[email protected]> update docker container Signed-off-by: soniasingla <[email protected]> update docker container Signed-off-by: soniasingla <[email protected]> Update minio container Signed-off-by: soniasingla <[email protected]> Add minio verification Signed-off-by: soniasingla <[email protected]> Update sidecar container Signed-off-by: soniasingla <[email protected]> Update compactor container Signed-off-by: soniasingla <[email protected]> Add thanosbench to generate blocks Signed-off-by: soniasingla <[email protected]> Add thanosbench to generate blocks Signed-off-by: soniasingla <[email protected]> Add thanosbench to generate blocks Signed-off-by: soniasingla <[email protected]> Update thanosbench container Signed-off-by: soniasingla <[email protected]> Add the newly generated image into sh file Signed-off-by: soniasingla <[email protected]> Updated image for all platforms(non-linux users) Signed-off-by: soniasingla <[email protected]> Update container for better picture Signed-off-by: soniasingla <[email protected]> Let's add more info Signed-off-by: soniasingla <[email protected]> Updating docker image and added thanosbench Signed-off-by: soniasingla <[email protected]> some nit fixes Signed-off-by: soniasingla <[email protected]> some nit fixes Signed-off-by: soniasingla <[email protected]> Update: Content Signed-off-by: soniasingla <[email protected]> Mounting the data into host Signed-off-by: soniasingla <[email protected]> Prometheus container Signed-off-by: soniasingla <[email protected]> Update the deployment and metrics docker Signed-off-by: soniasingla <[email protected]> Disbale compaction and change minio with TSDB step Signed-off-by: soniasingla <[email protected]> Add step to stop sidecar Signed-off-by: soniasingla <[email protected]> added thanos bucket and updated store container Signed-off-by: soniasingla <[email protected]> Updates sidecar container Signed-off-by: soniasingla <[email protected]> IP address correctly added and minor changes Signed-off-by: soniasingla <[email protected]> Updated step-3 Signed-off-by: soniasingla <[email protected]> Updated step-3 with nit improvements Signed-off-by: soniasingla <[email protected]> Updated step-4 with nit improvements Signed-off-by: soniasingla <[email protected]> cached, loaded Signed-off-by: soniasingla <[email protected]> updated sh file Signed-off-by: soniasingla <[email protected]> updated sh file Signed-off-by: soniasingla <[email protected]> updated sh file Signed-off-by: soniasingla <[email protected]> nit improvements Signed-off-by: soniasingla <[email protected]> nit improvements Signed-off-by: soniasingla <[email protected]> nit improvements Signed-off-by: soniasingla <[email protected]> Update tutorials/katacoda/thanos/2-lts/intro.md Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: soniasingla <[email protected]> Update tutorials/katacoda/thanos/2-lts/step1.md Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: soniasingla <[email protected]> Update tutorials/katacoda/thanos/2-lts/step1.md Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: soniasingla <[email protected]> Update tutorials/katacoda/thanos/2-lts/step1.md Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: soniasingla <[email protected]> Update tutorials/katacoda/thanos/2-lts/step1.md Co-authored-by: Bartlomiej Plotka <[email protected]> Signed-off-by: soniasingla <[email protected]> refactored states Signed-off-by: soniasingla <[email protected]> Revert "Replace sync/atomic with uber-go/atomic (thanos-io#2935)" This reverts commit 20a82b9. Signed-off-by: soniasingla <[email protected]> Revert "cleanup shipper NewWithCompacted function (thanos-io#2940)" This reverts commit 2a54885. Signed-off-by: soniasingla <[email protected]> running querier Signed-off-by: soniasingla <[email protected]> Adding updated thanos version Signed-off-by: soniasingla <[email protected]> tutorials/katacoda/thanos/2-lts/index.json ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~users querying data Signed-off-by: soniasingla <[email protected]> Cleaning up Signed-off-by: soniasingla <[email protected]>
1 parent bb1662a commit 885737a

File tree

15 files changed

+482
-8
lines changed

15 files changed

+482
-8
lines changed

tutorials/katacoda/thanos-pathway.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"course_id": "2-lts",
1313
"title": "Intro: Downsampling and unlimited metric retention for Prometheus",
14-
"description": "In progress. Stay Tuned!"
14+
"description": "Learn how to extend your metric retention in a cheap and easy way with Thanos."
1515
},
1616
{
1717
"course_id": "3-meta-monitoring",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
#!/usr/bin/env bash
2+
3+
docker pull dockerenginesonia/thanosbench:v7
4+
docker pull quay.io/prometheus/prometheus:v2.19.0
5+
docker pull quay.io/thanos/thanos:v0.15.0
6+
docker pull minio/minio:RELEASE.2019-01-31T00-31-19Z
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Summary
2+
3+
Congratulations! 🎉🎉🎉
4+
You completed our second Thanos tutorial. Let's summarize what we learned:
5+
6+
* To preserve the data beyond Prometheus regular retention time, we used an object storage system for backing up our historical data.
7+
* The Thanos Store component acts as a data retrieval proxy for data inside our object storage.
8+
* With Sidecar uploading metric blocks to the object store as soon as it is written to disk, it keeps the “scraper” (Prometheus with Thanos Sidecar), lightweight. This simplifies maintenance, cost, and system design.
9+
* Thanos Compactor improved query efficiency and also reduced the required storage size.
10+
11+
See next courses for other tutorials about different deployment models and more advanced features of Thanos!
12+
13+
### Feedback
14+
15+
Do you see any bug, typo in the tutorial or you have some feedback for us?
16+
17+
let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io

tutorials/katacoda/thanos/2-lts/index.json

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,52 @@
11
{
22
"title": "Intro: Downsampling and unlimited metric retention for Prometheus",
3-
"description": "Learn how to extend you metric retention in a cheap way with Thanos.",
3+
"description": "Learn how to extend your metric retention in a cheap and easy way with Thanos.",
4+
"difficulty": "Beginner",
5+
"time": "15-20 Minutes",
46
"details": {
57
"steps": [
8+
{
9+
"title": "Configuring Initial Prometheus Server",
10+
"text": "step1.md",
11+
"verify": "step1-verify.sh"
12+
},
13+
{
14+
"title": "Thanos Sidecars",
15+
"text": "step2.md",
16+
"verify": "step2-verify.sh"
17+
},
18+
{
19+
"title": "Thanos Store Gateway",
20+
"text": "step3.md",
21+
"answer": "step3-answer.md"
22+
},
23+
{
24+
"title": "Thanos Compactor",
25+
"text": "step4.md"
26+
}
627
],
728
"intro": {
829
"text": "intro.md",
9-
"courseData": "courseBase.sh"
30+
"courseData": "courseBase.sh",
31+
"credits": "https://thanos.io"
32+
},
33+
"files": {
34+
"text": "finish.md"
1035
}
1136
},
37+
"files": [
38+
"prometheus0_eu1.yml",
39+
"bucket_storage.yml"
40+
],
1241
"environment": {
1342
"uilayout": "editor-terminal",
14-
"uisettings": "yaml"
43+
"uisettings": "yaml",
44+
"showdashboard": true,
45+
"dashboards": [
46+
{"name": "Prometheus 0 EU1", "port": 9090},
47+
{"name": "Minio", "port": 9000},
48+
{"name": "Thanos Query", "port": 29090}
49+
]
1550
},
1651
"backend": {
1752
"imageid": "docker-direct"
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
# In progress
1+
[Thanos](thanos.io) is a set of components that can be composed into a highly available metric system with unlimited storage capacity. It can be added seamlessly on top of existing Prometheus deployments.
22

3-
🚧 This tutorial is in progress. 🚧
3+
This course uses docker containers with pre-built docker images.
44

5-
Do you want to see this soon or you want to help us?
5+
In this tutorial, you will learn about :
66

7-
Let us know on https://github.com/thanos-io/thanos or #thanos slack channel linked on https://thanos.io
7+
* How to start uploading your Prometheus data seamlessly to cheap object storage thanks to Thanos sidecar.
8+
* How to further query data in object storage thanks to Thanos Store Gateway: a metric browser that serves metric blocks stored in Object Store via *StoreAPI* gRPC API.
9+
* How to query both fresh and older data in easy way through Thanos Querier.
10+
11+
12+
All of this allows you to keep your metrics in cheap and reliable object storage, allowing virtually unlimited metric retention for Prometheus.
13+
14+
Let's jump in!
469 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env bash
2+
3+
curl -s 127.0.0.1:9090/metrics > /dev/null || exit 1
4+
5+
curl -s 127.0.0.1:19090/metrics > /dev/null || exit 1
6+
7+
curl -s 127.0.0.1:29090/metrics > /dev/null || exit 1
8+
9+
echo "\"done\""
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Step 1 - Initial Prometheus Setup
2+
3+
Thanos is a set of components that adds high availability to Prometheus installations, unlimited metrics retention and global querying across clusters.
4+
5+
Thanos builds upon existing Prometheus instances which makes it seamlessly integrates into existing Prometheus setups.
6+
7+
In this tutorial, we will mimic the usual state with a Prometheus server running for several months. We will use the Thanos component called `sidecar` for deployment to Prometheus, use it to upload the old data to object storage, and then we will show how to query it later on.
8+
9+
It allows us to cost-effectively achieve unlimited retention for Prometheus.
10+
11+
Let's start this initial Prometheus setup, ready?
12+
13+
## Generate Artifical Metric Data
14+
15+
Before starting Prometheus, let's generate some artificial data. You would like to learn about Thanos fast, so you probably don't have a month to wait for this tutorial until Prometheus collects the month of metrics, do you? (:
16+
17+
We will use our handy [thanosbench](link here) project to do so.
18+
19+
So let's generate Prometheus blocks with just some 4 series that spans from a month ago until now!
20+
21+
Execute the following command:
22+
23+
```
24+
mkdir -p test && docker run -i dockerenginesonia/thanosbench:v7 block plan -p realistic-key-k8s-1d-small --labels 'cluster="one"' --max-time 2019-10-18T00:00:00Z | docker run -v /root/test:/test -i dockerenginesonia/thanosbench:v7 block gen --output.dir test
25+
```{{execute}}
26+
27+
## Prometheus Configuration Files
28+
29+
Here, we will prepare configuration files for the Prometheus instance that will run with our pre-generated data.
30+
It will also scrape our components we will use in this tutorial.
31+
32+
Click `Copy To Editor` for config to propagate the configs to file.
33+
34+
<pre class="file" data-filename="prometheus0_eu1.yml" data-target="replace">
35+
global:
36+
scrape_interval: 15s
37+
evaluation_interval: 15s
38+
external_labels:
39+
cluster: eu1
40+
replica: 0
41+
42+
scrape_configs:
43+
- job_name: 'prometheus'
44+
static_configs:
45+
- targets: ['127.0.0.1:9090']
46+
- job_name: 'sidecar'
47+
static_configs:
48+
- targets: ['127.0.0.1:19090']
49+
- job_name: 'minio'
50+
metrics_path: /minio/prometheus/metrics
51+
static_configs:
52+
- targets: ['127.0.0.1:9000']
53+
- job_name: 'store_gateway'
54+
static_configs:
55+
- targets: ['127.0.0.1:19095']
56+
</pre>
57+
58+
## Starting Prometheus Instances
59+
60+
Let's now start the container representing Prometheus instance.
61+
62+
Note `-v $(pwd)/test:/prometheus \` and `--storage.tsdb.path=/prometheus` that allows us to place our generated data in Prometheus data directory.
63+
64+
Execute the following commands:
65+
66+
### Prepare "persistent volumes"
67+
68+
69+
### Deploying "EU1"
70+
71+
```
72+
docker run -d --net=host --rm \
73+
-v $(pwd)/prometheus0_eu1.yml:/etc/prometheus/prometheus.yml \
74+
-v $(pwd)/test:/prometheus \
75+
-u root \
76+
--name prometheus-0-eu1 \
77+
quay.io/prometheus/prometheus:v2.19.0 \
78+
--config.file=/etc/prometheus/prometheus.yml \
79+
--storage.tsdb.path=/prometheus \
80+
--storage.tsdb.max-block-duration=2h \
81+
--storage.tsdb.min-block-duration=2h \
82+
--web.listen-address=:9090 \
83+
--web.external-url=https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com \
84+
--web.enable-lifecycle \
85+
--web.enable-admin-api && echo "Prometheus EU1 started!"
86+
```{{execute}}
87+
88+
## Setup Verification
89+
90+
Once started you should be able to reach the Prometheus instance here:
91+
92+
* [Prometheus-0 EU1](https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/)
93+
94+
# Installing Thanos sidecar
95+
96+
At the end of this step, we will have running Prometheus instance with sidecar deployed. You can read more about sidecar [here](https://thanos.io/tip/components/sidecar.md/).
97+
98+
99+
## Deployment
100+
101+
Click snippets to add a sidecar to the Prometheus instance.
102+
103+
### Adding sidecar to "EU1" Prometheus
104+
105+
```
106+
docker run -d --net=host --rm \
107+
-v $(pwd)/prometheus0_eu1.yml:/etc/prometheus/prometheus.yml \
108+
-v $(pwd)/test:/prometheus \
109+
--name prometheus-0-sidecar-eu1 \
110+
-u root \
111+
quay.io/thanos/thanos:v0.15.0 \
112+
sidecar \
113+
--http-address 0.0.0.0:19090 \
114+
--grpc-address 0.0.0.0:19190 \
115+
--reloader.config-file /etc/prometheus/prometheus.yml \
116+
--prometheus.url http://127.0.0.1:9090 && echo "Started sidecar for Prometheus 0 EU1"
117+
```{{execute}}
118+
119+
Now, you should have a sidecar running well. Since now Prometheus has access to sidecar metrics we can query for [`thanos_sidecar_prometheus_up`](https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/graph?g0.expr=thanos_sidecar_prometheus_up&g0.tab=1) to check if sidecar has access to Prometheus.
120+
121+
## Problem statement:
122+
123+
Let's try to play with this setup a bit.
124+
125+
Grab a coffee (or your favorite tasty beverage). Let's verify whether the blocks were uploaded before or not? Interesting? 😉
126+
127+
Tip: Look for `prometheus_tsdb_reloads_total` metric 🕵️‍
128+
129+
* Check here <a href="https://[[HOST_SUBDOMAIN]]-9090-[[KATACODA_HOST]].environments.katacoda.com/graph?g0.range_input=1h&g0.expr=prometheus_tsdb_reloads_total&g0.tab=1&g1.range_input=5m&g1.expr=prometheus_tsdb_head_series&g1.tab=0">`prometheus_tsdb_reloads_total`</a>
130+
131+
## Deploying Thanos Querier
132+
133+
Let' now start the Query component. As you remember [Thanos sidecar](https://thanos.io/tip/components/query.md/) exposes `StoreAPI`
134+
so we will make sure we point the Querier to the gRPC endpoints of the sidecar:
135+
136+
Click below snippet to start the Querier.
137+
138+
```
139+
docker run -d --net=host --rm \
140+
--name querier \
141+
quay.io/thanos/thanos:v0.15.0 \
142+
query \
143+
--http-address 0.0.0.0:29090 \
144+
--query.replica-label replica \
145+
--store 127.0.0.1:19190 \
146+
--store 127.0.0.1:10906 && echo "Started Thanos Querier"
147+
```{{execute}}
148+
149+
## Setup verification
150+
151+
Thanos Querier exposes very similar UI to the Prometheus, but on top of many `StoreAPIs, you wish to connect to.
152+
153+
To check if the Querier works as intended let's look on [Querier UI `Store` page](https://[[HOST_SUBDOMAIN]]-29090-[[KATACODA_HOST]].environments.katacoda.com/stores).
154+
155+
This should list the sidecar, including the external label.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
curl -s 127.0.0.1:9090/metrics > /dev/null || exit 1
4+
5+
curl -s 127.0.0.1:19090/metrics > /dev/null || exit 1
6+
7+
curl -s 127.0.0.1:29090/metrics > /dev/null || exit 1
8+
9+
curl -s 127.0.0.1:9090/metrics > /dev/null || exit 1
10+
11+
curl -s 127.0.0.1:19090/metrics > /dev/null || exit 1
12+
13+
echo "\"done\""
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Step 2 - Object Storage Configuration
2+
3+
In this step, we will configure the object store and change sidecar to upload to the object-store.
4+
5+
## Running Minio
6+
7+
Now, execute the command
8+
9+
```
10+
mkdir -p /storage/thanos && docker run -d --name minio -v /storage:/data -p 9000:9000 -e "MINIO_ACCESS_KEY=minio" -e "MINIO_SECRET_KEY=minio123" minio/minio:RELEASE.2019-01-31T00-31-19Z server /data
11+
```{{execute}}
12+
13+
## Verification
14+
15+
Now, you should have minio running well.
16+
17+
To check if the Minio is working as intended, let's check out [here](https://[[HOST_SUBDOMAIN]]-9000-[[KATACODA_HOST]].environments.katacoda.com/minio/)
18+
19+
Enter the credentials as mentioned below:
20+
21+
**Access Key** = `minio`
22+
**Secret Key** = `minio123`
23+
24+
## Configuration :
25+
26+
The configuration file content :
27+
28+
Click `Copy To Editor` for config to propagate the configs to the file `bucket_storage.yml`:
29+
30+
<pre class="file" data-filename="bucket_storage.yml" data-target="replace">
31+
type: S3
32+
config:
33+
bucket: "thanos"
34+
endpoint: "127.0.0.1:9000"
35+
insecure: true
36+
signature_version2: true
37+
access_key: "minio"
38+
secret_key: "minio123"
39+
</pre>
40+
41+
Before moving forward, we need to stop the `sidecar container` and we can do so by executing the following command:
42+
43+
```
44+
docker stop prometheus-0-sidecar-eu1
45+
```{{execute}}
46+
47+
Now, execute the following command :
48+
49+
```
50+
docker run -d --net=host --rm \
51+
-v $(pwd)/bucket_storage.yml:/etc/prometheus/bucket_storage.yml \
52+
-v $(pwd)/test:/prometheus \
53+
--name sidecar \
54+
-u root \
55+
quay.io/thanos/thanos:v0.15.0 \
56+
sidecar \
57+
--tsdb.path /prometheus \
58+
--objstore.config-file /etc/prometheus/bucket_storage.yml \
59+
--prometheus.url http://127.0.0.1:9090 \
60+
--http-address 0.0.0.0:19090 \
61+
--grpc-address 0.0.0.0:19190 && echo "Store API exposed"
62+
```{{execute}}
63+
64+
The flag `--objstore.config-file` loads all the required configuration from the file to ship the TSDB blocks to an object storage bucket, the storage endpoints, and the credentials used.
65+
66+
## Verification
67+
68+
We can check whether the data is uploaded into `thanos` bucket by visitng [Minio](https://[[HOST_SUBDOMAIN]]-9000-[[KATACODA_HOST]].environments.katacoda.com/minio/). The stored metrics will also be available in the object storage.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Answer
2+
3+
**In an HA Prometheus setup with Thanos sidecars, would there be issues with multiple sidecars attempting to upload the same data blocks to object storage?**
4+
5+
This is handled by having unique **external labels** for all Prometheus, sidecar instances and HA replicas. To indicate that all replicas are storing same targets, they differ only in one label.
6+
7+
For an instance, consider the situation below:
8+
9+
```
10+
First:
11+
"cluster": "prod1"
12+
"replica": "0"
13+
14+
Second:
15+
"cluster":"prod1"
16+
"replica": "1"
17+
```
18+
19+
There is no problem with storing them since the label sets are **unique**.

0 commit comments

Comments
 (0)