Skip to content
Merged
Show file tree
Hide file tree
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
@@ -0,0 +1,29 @@
// Module included in the following assemblies:
//
// * monitoring/enabling-monitoring-for-user-defined-projects.adoc

[id="excluding-a-user-defined-project-from-monitoring_{context}"]
= Excluding a user-defined project from monitoring

Individual user-defined projects can be excluded from user workload monitoring. To do so, simply add the `openshift.io/user-monitoring` label to the project's namespace with a value of `false`.

.Procedure

. Add the label to the project namespace:
+
[source,terminal]
----
$ oc label namespace my-project 'openshift.io/user-monitoring=false'
----
+
. To re-enable monitoring, remove the label from the namespace:
+
[source,terminal]
----
$ oc label namespace my-project 'openshift.io/user-monitoring-'
----
+
[NOTE]
====
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.
====
3 changes: 3 additions & 0 deletions monitoring/enabling-monitoring-for-user-defined-projects.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ include::modules/monitoring-granting-users-permission-to-configure-monitoring-fo
// Accessing metrics from outside the cluster for custom applications
include::modules/accessing-metrics-outside-cluster.adoc[leveloffset=+1]

// Excluding a user-defined project from monitoring
include::modules/monitoring-excluding-a-user-defined-project-from-monitoring.adoc[leveloffset=+1]

// Disabling monitoring for user-defined projects
include::modules/monitoring-disabling-monitoring-for-user-defined-projects.adoc[leveloffset=+1]

Expand Down