Skip to content

Commit

Permalink
OBSDOCS-1011: Fix information about the user-workload-monitoring-conf…
Browse files Browse the repository at this point in the history
…ig ConfigMap
  • Loading branch information
eromanova97 committed May 7, 2024
1 parent 6d89d15 commit 63c02d8
Show file tree
Hide file tree
Showing 22 changed files with 33 additions and 107 deletions.
Expand Up @@ -23,9 +23,9 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` config map.
** You have created the secret to be configured in Alertmanager in the `openshift-monitoring` project.
* *If you are configuring components that monitor user-defined projects*:
** A cluster administrator has enabled monitoring for user-defined projects.
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the secret to be configured in Alertmanager in the `openshift-user-workload-monitoring` project.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -128,13 +128,6 @@ data:
- test-secret
- test-api-receiver-token
----
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]

. Save the file to apply the changes to the `ConfigMap` object. The new configuration is applied automatically.

Expand Up @@ -22,7 +22,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects*:
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -126,13 +126,6 @@ data:
----

. Save the file to apply the changes. The new component placement configuration is applied automatically.
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]
+
[WARNING]
====
Expand Down
Expand Up @@ -16,7 +16,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects*:
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -135,13 +135,6 @@ data:
----
. Save the file to apply the changes. The new configuration is applied automatically.
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]
+
[WARNING]
====
Expand Down
Expand Up @@ -21,7 +21,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects*:
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -207,13 +207,6 @@ Storage requirements for the `thanosRuler` component depend on the number of rul
====

. Save the file to apply the changes. The pods affected by the new configuration are restarted automatically and the new storage configuration is applied.
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
+
[WARNING]
Expand Down
11 changes: 1 addition & 10 deletions modules/monitoring-configuring-external-alertmanagers.adoc
Expand Up @@ -24,7 +24,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` config map.
* *If you are configuring components that monitor user-defined projects*:
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` config map.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -165,14 +165,5 @@ data:
----

. Save the file to apply the changes to the `ConfigMap` object. The new component placement configuration is applied automatically.
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]

. Save the file to apply the changes to the `ConfigMap` object. The new component placement configuration is applied automatically.


Expand Up @@ -29,8 +29,8 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have access to the cluster as a user with the `cluster-admin` cluster role.
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring pods for user-defined monitoring:*
** A cluster administrator has enabled monitoring for user-defined projects.
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down
9 changes: 1 addition & 8 deletions modules/monitoring-configuring-remote-write-storage.adoc
Expand Up @@ -17,7 +17,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects:*
** You have access to the cluster as a user with the `cluster-admin` cluster role or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -202,13 +202,6 @@ data:
See the link:https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config[Prometheus relabel_config documentation] for information about write relabel configuration options.
. Save the file to apply the changes. The pods affected by the new configuration restart automatically.
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]
+
[WARNING]
====
Expand Down
9 changes: 1 addition & 8 deletions modules/monitoring-configuring-the-monitoring-stack.adoc
Expand Up @@ -21,7 +21,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects*:
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -137,13 +137,6 @@ The Prometheus config map component is called `prometheusK8s` in the `cluster-mo
endif::openshift-dedicated,openshift-rosa[]

. Save the file to apply the changes to the `ConfigMap` object. The pods affected by the new configuration are restarted automatically.
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]
+
[WARNING]
====
Expand Down
Expand Up @@ -34,7 +34,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects:*
** You have access to the cluster as a user with the `cluster-admin` cluster role or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down
3 changes: 1 addition & 2 deletions modules/monitoring-creating-scrape-sample-alerts.adoc
Expand Up @@ -14,8 +14,7 @@ You can create alerts that notify you when:
.Prerequisites

* You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
* You have enabled monitoring for user-defined projects.
* You have created the `user-workload-monitoring-config` `ConfigMap` object.
* A cluster administrator has enabled monitoring for user-defined projects.
* You have limited the number of samples that can be accepted per target scrape in user-defined projects, by using `enforcedSampleLimit`.
* You have installed the OpenShift CLI (`oc`).
Expand Down
Expand Up @@ -6,11 +6,13 @@
[id="creating-user-defined-workload-monitoring-configmap_{context}"]
= Creating a user-defined workload monitoring config map

You can configure the user workload monitoring components by creating the `user-workload-monitoring-config` `ConfigMap` object in the `openshift-user-workload-monitoring` project. The Cluster Monitoring Operator (CMO) then configures the components that monitor user-defined projects.
You can configure the user workload monitoring components with the `user-workload-monitoring-config` `ConfigMap` object in the `openshift-user-workload-monitoring` project. The Cluster Monitoring Operator (CMO) then configures the components that monitor user-defined projects.

[NOTE]
====
When you save your changes to the `user-workload-monitoring-config` `ConfigMap` object, some or all of the pods in the `openshift-user-workload-monitoring` project might be redeployed. It can sometimes take a while for these components to redeploy. You can create and configure the config map before you first enable monitoring for user-defined projects, to prevent having to redeploy the pods often.
* If you enable monitoring for user-defined projects, the `user-workload-monitoring-config` `ConfigMap` object is created by default.
* When you save your changes to the `user-workload-monitoring-config` `ConfigMap` object, some or all of the pods in the `openshift-user-workload-monitoring` project might be redeployed. It can sometimes take a while for these components to redeploy.
====

.Prerequisites
Expand Down Expand Up @@ -47,8 +49,10 @@ data:
----
$ oc apply -f user-workload-monitoring-config.yaml
----
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]
Expand Up @@ -22,7 +22,7 @@ ifdef::openshift-rosa,openshift-dedicated[]
endif::[]
ifndef::openshift-rosa,openshift-dedicated[]
* You have access to the cluster as a user with the `cluster-admin` cluster role.
* You have enabled monitoring for user-defined projects in the `cluster-monitoring-config` config map for the `openshift-monitoring` namespace.
* You have enabled monitoring for user-defined projects.
endif::[]
* You have installed the OpenShift CLI (`oc`).

Expand Down
Expand Up @@ -27,7 +27,7 @@ You must have access to the cluster as a user with the `cluster-admin` cluster r
+
[NOTE]
====
Every time you save configuration changes to the `user-workload-monitoring-config` `ConfigMap` object, the pods in the `openshift-user-workload-monitoring` project are redeployed. It can sometimes take a while for these components to redeploy. You can create and configure the `ConfigMap` object before you first enable monitoring for user-defined projects, to prevent having to redeploy the pods often.
Every time you save configuration changes to the `user-workload-monitoring-config` `ConfigMap` object, the pods in the `openshift-user-workload-monitoring` project are redeployed. It can sometimes take a while for these components to redeploy.
====
.Procedure
Expand Down Expand Up @@ -56,12 +56,17 @@ data:

. Save the file to apply the changes. Monitoring for user-defined projects is then enabled automatically.
+
[NOTE]
====
If you enable monitoring for user-defined projects, the `user-workload-monitoring-config` `ConfigMap` object is created by default.
====
+
[WARNING]
====
When changes are saved to the `cluster-monitoring-config` `ConfigMap` object, the pods and other resources in the `openshift-monitoring` project might be redeployed. The running monitoring processes in that project might also be restarted.
====

. Check that the `prometheus-operator`, `prometheus-user-workload` and `thanos-ruler-user-workload` pods are running in the `openshift-user-workload-monitoring` project. It might take a short while for the pods to start:
. Verify that the `prometheus-operator`, `prometheus-user-workload` and `thanos-ruler-user-workload` pods are running in the `openshift-user-workload-monitoring` project. It might take a short while for the pods to start:
+
[source,terminal]
----
Expand Down
Expand Up @@ -17,7 +17,7 @@ ifdef::openshift-rosa,openshift-dedicated[]
endif::[]
ifndef::openshift-rosa,openshift-dedicated[]
* You have access to the cluster as a user with the `cluster-admin` cluster role.
* You have enabled monitoring for user-defined projects in the `cluster-monitoring-config` config map for the `openshift-monitoring` namespace.
* You have enabled monitoring for user-defined projects.
endif::[]
* The user account that you are assigning the role to already exists.
* You have installed the OpenShift CLI (`oc`).
Expand Down
Expand Up @@ -18,8 +18,7 @@ ifdef::openshift-rosa,openshift-dedicated[]
* You have access to the cluster as a user with the `dedicated-admin` role.
endif::openshift-rosa,openshift-dedicated[]
* You have installed the OpenShift CLI (`oc`).
* You have enabled and configured monitoring for user-defined workloads.
* You have created the `user-workload-monitoring-config` `ConfigMap` object.
* You have enabled and configured monitoring for user-defined projects.
* You have created a `ServiceMonitor` resource.

.Procedure
Expand Down
Expand Up @@ -45,9 +45,8 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have access to the cluster as a user with the `cluster-admin` cluster role.
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects*:
** A cluster administrator has enabled monitoring for user-defined projects.
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down
Expand Up @@ -13,7 +13,6 @@ By default, for user-defined projects, Thanos Ruler automatically retains metric
ifndef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `cluster-admin` cluster role or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
* A cluster administrator has enabled monitoring for user-defined projects.
* You have created the `user-workload-monitoring-config` `ConfigMap` object.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down
Expand Up @@ -26,7 +26,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are configuring components that monitor user-defined projects*:
** You have access to the cluster as a user with the `cluster-admin` cluster role or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
endif::openshift-dedicated,openshift-rosa[]
ifdef::openshift-dedicated,openshift-rosa[]
* You have access to the cluster as a user with the `dedicated-admin` role.
Expand Down Expand Up @@ -119,13 +119,6 @@ If monitoring components remain in a `Pending` state after configuring the `node

. Save the file to apply the changes.
The components specified in the new configuration are moved to the new nodes automatically.
ifndef::openshift-dedicated,openshift-rosa[]
+
[NOTE]
====
Configurations applied to the `user-workload-monitoring-config` `ConfigMap` object are not activated unless a cluster administrator has enabled monitoring for user-defined projects.
====
endif::openshift-dedicated,openshift-rosa[]
+
[WARNING]
====
Expand Down
Expand Up @@ -22,7 +22,7 @@ No service disruption occurs during this process.
** You have configured at least one PVC for core {product-title} monitoring components.
* *If you are configuring components that monitor user-defined projects*:
** You have access to the cluster as a user with the `cluster-admin` cluster role, or as a user with the `user-workload-monitoring-config-edit` role in the `openshift-user-workload-monitoring` project.
** You have created the `user-workload-monitoring-config` `ConfigMap` object.
** A cluster administrator has enabled monitoring for user-defined projects.
** You have configured at least one PVC for components that monitor user-defined projects.
.Procedure
Expand Down

0 comments on commit 63c02d8

Please sign in to comment.