$ oc label namespace my-project 'openshift.io/user-monitoring=false'
As a dedicated-admin
, you can disable monitoring for user-defined projects. You can also exclude individual projects from user workload monitoring.
By default, monitoring for user-defined projects is enabled. If you do not want to use the built-in monitoring stack to monitor user-defined projects, you can disable it.
You logged in to OpenShift Cluster Manager.
From the OpenShift Cluster Manager Hybrid Cloud Console, select a cluster.
Click the Settings tab.
Click the Enable user workload monitoring check box to unselect the option, and then click Save.
User workload monitoring is disabled. The Prometheus, Prometheus Operator, and Thanos Ruler components are stopped in the openshift-user-workload-monitoring
project.
Individual user-defined projects can be excluded from user workload monitoring. To do so, add the openshift.io/user-monitoring
label to the project’s namespace with a value of false
.
Add the label to the project namespace:
$ oc label namespace my-project 'openshift.io/user-monitoring=false'
To re-enable monitoring, remove the label from the namespace:
$ oc label namespace my-project 'openshift.io/user-monitoring-'
If there were any active monitoring targets for the project, it may take a few minutes for Prometheus to stop scraping them after adding the label. |