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 Apr 26, 2024
1 parent 3841d15 commit 69e9682
Show file tree
Hide file tree
Showing 18 changed files with 61 additions and 23 deletions.
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
2 changes: 1 addition & 1 deletion modules/monitoring-configuring-remote-write-storage.adoc
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
2 changes: 1 addition & 1 deletion modules/monitoring-configuring-the-monitoring-stack.adoc
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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 @@ -159,6 +159,13 @@ data:

. Save the file to apply the changes to the `ConfigMap` object.
The pods affected by the updated configuration automatically restart.
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
10 changes: 8 additions & 2 deletions modules/monitoring-creating-scrape-sample-alerts.adoc
Original file line number Diff line number Diff line change
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.
* The `user-workload-monitoring-config` `ConfigMap` object exists.
* 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 @@ -72,3 +71,10 @@ spec:
----
$ oc apply -f monitoring-stack-alerts.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[]
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

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.

[NOTE]
[TIP]
====
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.
====
Expand Down Expand Up @@ -47,8 +47,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[]
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You must have access to the cluster as a user with the `cluster-admin` cluster r
* You have created the `cluster-monitoring-config` `ConfigMap` object.
* You have optionally created and configured the `user-workload-monitoring-config` `ConfigMap` object in the `openshift-user-workload-monitoring` project. You can add configuration options to this `ConfigMap` object for the components that monitor user-defined projects.
+
[NOTE]
[IP]
====
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.
====
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 before creating the `user-workload-monitoring-config` `ConfigMap`, the config map 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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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.
**The `user-workload-monitoring-config` `ConfigMap` object exists.
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 @@ -148,6 +147,13 @@ data:
----
. 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ 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.
* The `user-workload-monitoring-config` `ConfigMap` object exists.
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 @@ -65,6 +64,13 @@ data:
----

. Save the file to apply the changes. The pods affected by the new configuration automatically restart.
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
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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: 8 additions & 1 deletion modules/monitoring-resizing-a-persistent-storage-volume.adoc
Original file line number Diff line number Diff line change
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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
** You have configured at least one PVC for components that monitor user-defined projects.
.Procedure
Expand Down Expand Up @@ -182,6 +182,13 @@ 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 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
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are setting a log level for Prometheus Operator, Prometheus, or Thanos Ruler in the `openshift-user-workload-monitoring` project*:
** 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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ifndef::openshift-dedicated,openshift-rosa[]
** You have created the `cluster-monitoring-config` `ConfigMap` object.
* *If you are enabling the query log file feature for Prometheus in the `openshift-user-workload-monitoring` project*:
** 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.
** The `user-workload-monitoring-config` `ConfigMap` object exists.
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ If you set sample or label limits, no further sample data is ingested for that t

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.
* You have enabled monitoring for user-defined projects.
* The `user-workload-monitoring-config` `ConfigMap` object exists.
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

0 comments on commit 69e9682

Please sign in to comment.