Skip to content

Commit ede2de4

Browse files
authored
Merge pull request #66381 from lahinson/osdocs-6569-hcp-monitoring
[OSDOCS-6569]: Add monitoring dashboard docs for hosted control planes
2 parents 0b028ee + 14363b3 commit ede2de4

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

hosted_control_planes/hcp-managing.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ include::modules/updating-node-pools-for-hcp.adoc[leveloffset=+1]
1717
include::modules/hosted-control-planes-pause-reconciliation.adoc[leveloffset=+1]
1818
//using service-level DNS for control plane services
1919
include::modules/hosted-control-planes-metrics-sets.adoc[leveloffset=+1]
20+
include::modules/hosted-control-planes-monitoring-dashboard.adoc[leveloffset=+1]
2021
//automated machine management
2122
include::modules/scale-down-data-plane.adoc[leveloffset=+1]
2223
include::modules/delete-hosted-cluster.adoc[leveloffset=+1]
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * hosted_control_planes/hcp-managing.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="hosted-control-planes-monitoring-dashboard_{context}"]
7+
= Creating monitoring dashboards for hosted clusters
8+
9+
The HyperShift Operator can create or delete monitoring dashboards in the management cluster for each hosted cluster that it manages.
10+
11+
[#hosted-control-planes-enable-dashboard]
12+
== Enabling monitoring dashboards
13+
14+
To enable monitoring dashboards in a hosted cluster, complete the following steps:
15+
16+
.Procedure
17+
18+
. Create the `hypershift-operator-install-flags` config map in the `local-cluster` namespace, being sure to specify the `--monitoring-dashboards` flag in the `data.installFlagsToAdd` section. For example:
19+
20+
+
21+
[source,yaml]
22+
----
23+
kind: ConfigMap
24+
apiVersion: v1
25+
metadata:
26+
name: hypershift-operator-install-flags
27+
namespace: local-cluster
28+
data:
29+
installFlagsToAdd: "--monitoring-dashboards"
30+
installFlagsToRemove: ""
31+
----
32+
33+
. Wait a couple of minutes for the HyperShift Operator deployment in the `hypershift` namespace to be updated to include the following environment variable:
34+
35+
+
36+
----
37+
- name: MONITORING_DASHBOARDS
38+
value: "1"
39+
----
40+
41+
+
42+
When monitoring dashboards are enabled, for each hosted cluster that the HyperShift Operator manages, the Operator creates a config map named `cp-[NAMESPACE]-[NAME]` in the `openshift-config-managed` namespace, where `NAMESPACE` is the namespace of the hosted cluster and `NAME` is the name of the hosted cluster. As a result, a new dashboard is added in the administrative console of the management cluster.
43+
44+
. To view the dashboard, log in to the management cluster's console and go to the dashboard for the hosted cluster by clicking *Observe -> Dashboards*.
45+
46+
. Optional: To disable a monitoring dashboards in a hosted cluster, remove the `--monitoring-dashboards` flag from the `hypershift-operator-install-flags` config map. When you delete a hosted cluster, its corresponding dashboard is also deleted.
47+
48+
[#hosted-control-planes-customize-dashboards]
49+
== Dashboard customization
50+
51+
To generate dashboards for each hosted cluster, the HyperShift Operator uses a template that is stored in the `monitoring-dashboard-template` config map in the operator namespace (`hypershift`). This template contains a set of Grafana panels that contain the metrics for the dashboard. You can edit the content of the config map to customize the dashboards.
52+
53+
When a dashboard is generated, the following strings are replaced with values that correspond to a specific hosted cluster:
54+
55+
|===
56+
| Name | Description
57+
| [x-]`__NAME__` | The name of the hosted cluster
58+
| [x-]`__NAMESPACE__` | The namespace of the hosted cluster
59+
| [x-]`__CONTROL_PLANE_NAMESPACE__` | The namespace where the control plane pods of the hosted cluster are placed
60+
| [x-]`__CLUSTER_ID__` | The UUID of the hosted cluster, which matches the `_id` label of the hosted cluster metrics
61+
|===

0 commit comments

Comments
 (0)