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
The {product-title} monitoring dashboard enables you to run Prometheus Query Language (PromQL) queries to examine metrics visualized on a plot. This functionality provides information about the state of a cluster and any user-defined workloads that you are monitoring.
11
11
12
-
As a *cluster administrator*, you can query metrics for all core {product-title} and user-defined projects.
12
+
ifndef::openshift-dedicated,openshift-rosa[]
13
+
As a cluster administrator, you can query metrics for all core {product-title} and user-defined projects.
14
+
endif::openshift-dedicated,openshift-rosa[]
15
+
ifdef::openshift-dedicated,openshift-rosa[]
16
+
As a `dedicated-admin`, you can query one or more namespaces at a time for metrics about user-defined projects.
17
+
endif::openshift-dedicated,openshift-rosa[]
13
18
14
-
As a *developer*, you must specify a project name when querying metrics. You must have the required privileges to view metrics for the selected project.
19
+
As a developer, you must specify a project name when querying metrics. You must have the required privileges to view metrics for the selected project.
Copy file name to clipboardExpand all lines: modules/monitoring-accessing-the-alerting-ui.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,5 +16,5 @@ The Alerting UI is accessible through the Administrator perspective and the Deve
16
16
17
17
[NOTE]
18
18
====
19
-
In the Developer perspective, you can select from core {product-title} and user-defined projects that you have access to in the *Project:* list. However, alerts, silences, and alerting rules relating to core {product-title} projects are not displayed if you do not have `cluster-admin` privileges.
19
+
In the *Developer* perspective, you can select from core {product-title} and user-defined projects that you have access to in the *Project:* list. However, alerts, silences, and alerting rules relating to core {product-title} projects are not displayed if you are not logged in as a cluster administrator.
= Adding a secret to the Alertmanager configuration
8
8
9
+
ifndef::openshift-dedicated,openshift-rosa[]
9
10
You can add secrets to the Alertmanager configuration for core platform monitoring components by editing the `cluster-monitoring-config` config map in the `openshift-monitoring` project.
11
+
endif::openshift-dedicated,openshift-rosa[]
12
+
ifdef::openshift-dedicated,openshift-rosa[]
10
13
You can add secrets to the Alertmanager configuration for user-defined projects by editing the `user-workload-monitoring-config` config map in the `openshift-user-workload-monitoring` project.
14
+
endif::openshift-dedicated,openshift-rosa[]
11
15
12
16
After you add a secret to the config map, the secret is mounted as a volume at `/etc/alertmanager/secrets/<secret_name>` within the `alertmanager` container for the Alertmanager pods.
13
17
14
18
.Prerequisites
15
19
16
-
* You have installed the OpenShift CLI (`oc`).
20
+
ifndef::openshift-dedicated,openshift-rosa[]
17
21
* *If you are configuring core {product-title} monitoring components in the `openshift-monitoring` project*:
18
22
** You have access to the cluster as a user with the `cluster-admin` role.
19
23
** You have created the `cluster-monitoring-config` config map.
@@ -22,19 +26,27 @@ After you add a secret to the config map, the secret is mounted as a volume at `
22
26
** A cluster administrator has enabled monitoring for user-defined projects.
23
27
** You have access to the cluster as a user with the `cluster-admin` role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
24
28
** You have created the secret to be configured in Alertmanager in the `openshift-user-workload-monitoring` project.
29
+
endif::openshift-dedicated,openshift-rosa[]
30
+
ifdef::openshift-dedicated,openshift-rosa[]
31
+
* You have access to the cluster as a user with the `dedicated-admin` role.
32
+
* The `user-workload-monitoring-config``ConfigMap` object exists. This object is created by default when the cluster is created.
33
+
* You have created the secret to be configured in Alertmanager in the `openshift-user-workload-monitoring` project.
34
+
endif::openshift-dedicated,openshift-rosa[]
35
+
* You have installed the OpenShift CLI (`oc`).
25
36
26
37
.Procedure
27
38
28
-
. To add a secret configuration to Alertmanager for core platform monitoring, edit the `cluster-monitoring-config` config map in the `openshift-monitoring` project:
39
+
. Edit the `ConfigMap` object.
40
+
ifndef::openshift-dedicated,openshift-rosa[]
41
+
***To add a secret configuration to Alertmanager for core platform monitoring*:
42
+
.. Edit the `cluster-monitoring-config` config map in the `openshift-monitoring` project:
. Add a `secrets:` section under `data/config.yaml/alertmanagerMain`.
36
-
37
-
. Add the configuration details for the secret in this section:
49
+
.. Add a `secrets:` section under `data/config.yaml/alertmanagerMain` with the following configuration:
38
50
+
39
51
[source,yaml]
40
52
----
@@ -50,10 +62,8 @@ data:
50
62
- <secret_name_1> <2>
51
63
- <secret_name_2>
52
64
----
53
-
<1> This section contains the secrets to be mounted into Alertmanager.
54
-
The secrets must be located within the same namespace as the Alertmanager object.
55
-
<2> The name of the `Secret` object that contains authentication credentials for the receiver.
56
-
If you add multiple secrets, place each one on a new line.
65
+
<1> This section contains the secrets to be mounted into Alertmanager. The secrets must be located within the same namespace as the Alertmanager object.
66
+
<2> The name of the `Secret` object that contains authentication credentials for the receiver. If you add multiple secrets, place each one on a new line.
57
67
+
58
68
The following sample config map settings configure Alertmanager to use two `Secret` objects named `test-secret-basic-auth` and `test-secret-api-token`:
59
69
+
@@ -72,7 +82,36 @@ data:
72
82
- test-secret-api-token
73
83
----
74
84
75
-
. Optional: To add the secrets for use by Alertmanager in user-defined projects, add the secret names under `data/config.yaml/alertmanager/secrets` in the `user-workload-monitoring-config` config map in the `openshift-user-workload-monitoring` project:
85
+
***To add a secret configuration to Alertmanager for user-defined project monitoring*:
86
+
endif::openshift-dedicated,openshift-rosa[]
87
+
88
+
.. Edit the `user-workload-monitoring-config` config map in the `openshift-user-workload-monitoring` project:
.. Add a `secrets:` section under `data/config.yaml/alertmanager/secrets` with the following configuration:
96
+
+
97
+
[source,yaml]
98
+
----
99
+
apiVersion: v1
100
+
kind: ConfigMap
101
+
metadata:
102
+
name: user-workload-monitoring-config
103
+
namespace: openshift-user-workload-monitoring
104
+
data:
105
+
config.yaml: |
106
+
alertmanager:
107
+
secrets: <1>
108
+
- <secret_name_1> <2>
109
+
- <secret_name_2>
110
+
----
111
+
<1> This section contains the secrets to be mounted into Alertmanager. The secrets must be located within the same namespace as the Alertmanager object.
112
+
<2> The name of the `Secret` object that contains authentication credentials for the receiver. If you add multiple secrets, place each one on a new line.
113
+
+
114
+
The following sample config map settings configure Alertmanager to use two `Secret` objects named `test-secret` and `test-secret-api-token`:
76
115
+
77
116
[source,yaml]
78
117
----
@@ -89,12 +128,13 @@ data:
89
128
- test-secret
90
129
- test-api-receiver-token
91
130
----
131
+
ifndef::openshift-dedicated,openshift-rosa[]
92
132
+
93
133
[NOTE]
94
134
====
95
135
Configurations applied to the `user-workload-monitoring-config``ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
96
136
====
137
+
endif::openshift-dedicated,openshift-rosa[]
97
138
98
-
. Save the file to apply the changes to the `ConfigMap` object.
99
-
The new configuration is applied automatically.
139
+
. Save the file to apply the changes to the `ConfigMap` object. The new configuration is applied automatically.
If you manage multiple {product-title} clusters and use the remote write feature to send metrics data from these clusters to an external storage location, you can add cluster ID labels to identify the metrics data coming from different clusters.
10
-
You can then query these labels to identify the source cluster for a metric and distinguish that data from similar metrics data sent by other clusters.
9
+
If you manage multiple {product-title} clusters and use the remote write feature to send metrics data from these clusters to an external storage location, you can add cluster ID labels to identify the metrics data coming from different clusters. You can then query these labels to identify the source cluster for a metric and distinguish that data from similar metrics data sent by other clusters.
11
10
12
11
This way, if you manage many clusters for multiple customers and send metrics data to a single centralized storage system, you can use cluster ID labels to query metrics for a particular cluster or customer.
0 commit comments