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
* You have access to the cluster as a user with the `dedicated-admin` role.
19
19
endif::openshift-rosa,openshift-dedicated[]
20
-
* You have installed the OpenShift CLI (`oc`).
20
+
* You have installed the {oc-first}.
21
21
* You have enabled and configured monitoring for user-defined projects.
22
22
* You have created a `ServiceMonitor` resource.
23
23
24
24
.Procedure
25
25
26
-
. *Check that the corresponding labels match* in the service and `ServiceMonitor` resource configurations.
27
-
.. Obtain the label defined in the service. The following example queries the `prometheus-example-app` service in the `ns1` project:
26
+
. Ensure that your project is not excluded from user workload monitoring. The following examples use the `ns1` project.
27
+
28
+
.. Verify that the project _does not_ have the `openshift.io/user-monitoring=false` label attached:
29
+
+
30
+
[source,terminal]
31
+
----
32
+
$ oc get namespace ns1 --show-labels | grep 'openshift.io/user-monitoring=false'
33
+
----
34
+
+
35
+
[NOTE]
36
+
====
37
+
The default label set for user workload projects is `openshift.io/user-monitoring=true`. However, the label is not visible unless you manually apply it.
. Check that the corresponding labels match in the service and `ServiceMonitor` resource configurations. The following examples use the `prometheus-example-app` service, the `prometheus-example-monitor` service monitor, and the `ns1` project.
55
+
.. Obtain the label defined in the service.
28
56
+
29
57
[source,terminal]
30
58
----
@@ -38,7 +66,7 @@ $ oc -n ns1 get service prometheus-example-app -o yaml
38
66
app: prometheus-example-app
39
67
----
40
68
+
41
-
.. Check that the `matchLabels` definition in the `ServiceMonitor` resource configuration matches the label output in the preceding step. The following example queries the `prometheus-example-monitor` service monitor in the `ns1` project:
69
+
.. Check that the `matchLabels` definition in the `ServiceMonitor` resource configuration matches the label output in the preceding step.
42
70
+
43
71
[source,terminal]
44
72
----
@@ -68,7 +96,7 @@ spec:
68
96
You can check service and `ServiceMonitor` resource labels as a developer with view permissions for the project.
69
97
====
70
98
71
-
. *Inspect the logs for the Prometheus Operator* in the `openshift-user-workload-monitoring` project.
99
+
. Inspect the logs for the Prometheus Operator in the `openshift-user-workload-monitoring` project.
72
100
.. List the pods in the `openshift-user-workload-monitoring` project:
73
101
+
74
102
[source,terminal]
@@ -101,14 +129,14 @@ If there is a issue with the service monitor, the logs might include an error si
101
129
level=warn ts=2020-08-10T11:48:20.906739623Z caller=operator.go:1829 component=prometheusoperator msg="skipping servicemonitor" error="it accesses file system via bearer token file which Prometheus specification prohibits" servicemonitor=eagle/eagle namespace=openshift-user-workload-monitoring prometheus=user-workload
102
130
----
103
131
104
-
. *Review the target status for your endpoint* on the *Metrics targets* page in the {product-title} web console UI.
132
+
. Review the target status for your endpoint on the *Metrics targets* page in the {product-title} web console UI.
105
133
.. Log in to the {product-title} web console and navigate to *Observe* → *Targets* in the *Administrator* perspective.
106
134
107
135
.. Locate the metrics endpoint in the list, and review the status of the target in the *Status* column.
108
136
109
137
.. If the *Status* is *Down*, click the URL for the endpoint to view more information on the *Target Details* page for that metrics target.
110
138
111
-
. *Configure debug level logging for the Prometheus Operator* in the `openshift-user-workload-monitoring` project.
139
+
. Configure debug level logging for the Prometheus Operator in the `openshift-user-workload-monitoring` project.
112
140
.. Edit the `user-workload-monitoring-config``ConfigMap` object in the `openshift-user-workload-monitoring` project:
0 commit comments