Skip to content

OBSDOCS#1326: Improve 'troubleshooting monitoring issues, - post OCPBUGS#39126 #91401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ endif::openshift-rosa,openshift-rosa-hcp,openshift-dedicated[]

.Procedure

. Ensure that your project is not excluded from user workload monitoring. The following examples use the `ns1` project.
. Ensure that your project and resources are not excluded from user workload monitoring. The following examples use the `ns1` project.

.. Verify that the project _does not_ have the `openshift.io/user-monitoring=false` label attached:
+
Expand All @@ -37,6 +37,13 @@ $ oc get namespace ns1 --show-labels | grep 'openshift.io/user-monitoring=false'
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.
====

.. Verify that the `ServiceMonitor` and `PodMonitor` resources _do not_ have the `openshift.io/user-monitoring=false` label attached. The following example checks the `prometheus-example-monitor` service monitor.
+
[source,terminal]
----
$ oc -n ns1 get servicemonitor prometheus-example-monitor --show-labels | grep 'openshift.io/user-monitoring=false'
----

.. If the label is attached, remove the label:
+
.Example of removing the label from the project
Expand All @@ -45,6 +52,12 @@ The default label set for user workload projects is `openshift.io/user-monitorin
$ oc label namespace ns1 'openshift.io/user-monitoring-'
----
+
.Example of removing the label from the resource
[source,terminal]
----
$ oc -n ns1 label servicemonitor prometheus-example-monitor 'openshift.io/user-monitoring-'
----
+
.Example output
[source,terminal]
----
Expand All @@ -66,7 +79,7 @@ $ oc -n ns1 get service prometheus-example-app -o yaml
app: prometheus-example-app
----
+
.. Check that the `matchLabels` definition in the `ServiceMonitor` resource configuration matches the label output in the preceding step.
.. Check that the `matchLabels` definition in the `ServiceMonitor` resource configuration matches the label output in the previous step.
+
[source,terminal]
----
Expand Down