Skip to content

Commit e412fc4

Browse files
committed
OBSDOCS-578: Update the information in document - Restrict to use cluster or managed_cluster as custom labels for time series and alerts
1 parent 931622e commit e412fc4

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

modules/monitoring-attaching-additional-labels-to-your-time-series-and-alerts.adoc

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[id="attaching-additional-labels-to-your-time-series-and-alerts_{context}"]
77
= Attaching additional labels to your time series and alerts
88

9-
Using the external labels feature of Prometheus, you can attach custom labels to all time series and alerts leaving Prometheus.
9+
You can attach custom labels to all time series and alerts leaving Prometheus by using the external labels feature of Prometheus.
1010

1111
.Prerequisites
1212

@@ -49,17 +49,19 @@ data:
4949
config.yaml: |
5050
prometheusK8s:
5151
externalLabels:
52-
<key>: <value> <1>
52+
<key>: <value> # <1>
5353
----
5454
+
5555
<1> Substitute `<key>: <value>` with a map of key-value pairs where `<key>` is a unique name for the new label and `<value>` is its value.
5656
+
5757
[WARNING]
5858
====
59-
Do not use `prometheus` or `prometheus_replica` as key names, because they are reserved and will be overwritten.
59+
* Do not use `prometheus` or `prometheus_replica` as key names, because they are reserved and will be overwritten.
60+
61+
* Do not use `cluster` or `managed_cluster` as key names. Using them can cause issues where you are unable to see data in the developer dashboards.
6062
====
6163
+
62-
For example, to add metadata about the region and environment to all time series and alerts, use:
64+
For example, to add metadata about the region and environment to all time series and alerts, use the following example:
6365
+
6466
[source,yaml]
6567
----
@@ -98,22 +100,24 @@ data:
98100
config.yaml: |
99101
prometheus:
100102
externalLabels:
101-
<key>: <value> <1>
103+
<key>: <value> # <1>
102104
----
103105
+
104106
<1> Substitute `<key>: <value>` with a map of key-value pairs where `<key>` is a unique name for the new label and `<value>` is its value.
105107
+
106108
[WARNING]
107109
====
108-
Do not use `prometheus` or `prometheus_replica` as key names, because they are reserved and will be overwritten.
110+
* Do not use `prometheus` or `prometheus_replica` as key names, because they are reserved and will be overwritten.
111+
112+
* Do not use `cluster` or `managed_cluster` as key names. Using them can cause issues where you are unable to see data in the developer dashboards.
109113
====
110114
+
111115
[NOTE]
112116
====
113117
In the `openshift-user-workload-monitoring` project, Prometheus handles metrics and Thanos Ruler handles alerting and recording rules. Setting `externalLabels` for `prometheus` in the `user-workload-monitoring-config` `ConfigMap` object will only configure external labels for metrics and not for any rules.
114118
====
115119
+
116-
For example, to add metadata about the region and environment to all time series and alerts related to user-defined projects, use:
120+
For example, to add metadata about the region and environment to all time series and alerts related to user-defined projects, use the following example:
117121
+
118122
[source,yaml]
119123
----

0 commit comments

Comments
 (0)