Skip to content

Commit a96e78d

Browse files
committed
MON-1801: Document disabling Grafana in monitoring stack
1 parent fd8f5b8 commit a96e78d

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * monitoring/configuring-the-monitoring-stack.adoc
4+
5+
[id="disabling_grafana_{context}"]
6+
= Disabling the default Grafana deployment
7+
8+
By default, a read-only Grafana instance is deployed with a collection of dashboards displaying cluster metrics. The Grafana instance is not user-configurable.
9+
10+
You can disable the Grafana deployment, causing the associated resources to be deleted from the cluster. You might do this if you do not need these dashboards and want to conserve resources in your cluster. You will still be able to view metrics and dashboards included in the web console. Grafana can be safely enabled again at any time.
11+
12+
13+
.Prerequisites
14+
15+
* You have access to the cluster as a user with the `cluster-admin` role.
16+
* You have created the `cluster-monitoring-config` `ConfigMap` object.
17+
* You have installed the OpenShift CLI (`oc`).
18+
19+
.Procedure
20+
21+
. Edit the `cluster-monitoring-config` `ConfigMap` object in the `openshift-monitoring` project:
22+
+
23+
[source,terminal]
24+
----
25+
$ oc -n openshift-monitoring edit configmap cluster-monitoring-config
26+
----
27+
28+
. Add `enabled: false` for the `grafana` component under `data/config.yaml`:
29+
+
30+
[source,yaml]
31+
----
32+
apiVersion: v1
33+
kind: ConfigMap
34+
metadata:
35+
name: cluster-monitoring-config
36+
namespace: openshift-monitoring
37+
data:
38+
config.yaml: |
39+
grafana:
40+
enabled: false
41+
----
42+
43+
. Save the file to apply the changes. The resources will begin to be removed automatically when you apply the change.
44+
+
45+
[WARNING]
46+
====
47+
This change results in some components, including Prometheus and the Thanos Querier, being restarted. This might lead to previously collected metrics being lost if you have not yet followed the steps in the "Configuring persistent storage" section.
48+
====
49+
50+
. Check that the Grafana pod is no longer running. The following example lists the status of pods in the `openshift-monitoring` project:
51+
+
52+
[source,terminal]
53+
----
54+
$ oc -n openshift-monitoring get pods
55+
----
56+
+
57+
[NOTE]
58+
====
59+
It may take a few minutes after applying the change for these pods to terminate.
60+
====

monitoring/configuring-the-monitoring-stack.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ include::modules/monitoring-setting-log-levels-for-monitoring-components.adoc[le
133133
* See xref:../monitoring/configuring-the-monitoring-stack.adoc#preparing-to-configure-the-monitoring-stack[Preparing to configure the monitoring stack] for steps to create monitoring config maps
134134
* xref:../monitoring/enabling-monitoring-for-user-defined-projects.adoc#enabling-monitoring-for-user-defined-projects[Enabling monitoring for user-defined projects]
135135

136+
// Disabling the default Grafana deployment
137+
include::modules/monitoring-disabling-grafana.adoc[leveloffset=+1]
138+
139+
.Additional resources
140+
141+
* See xref:../monitoring/configuring-the-monitoring-stack.adoc#preparing-to-configure-the-monitoring-stack[Preparing to configure the monitoring stack] for steps to create monitoring config maps
142+
136143
== Next steps
137144

138145
* xref:../monitoring/enabling-monitoring-for-user-defined-projects.adoc#enabling-monitoring-for-user-defined-projects[Enabling monitoring for user-defined projects]

0 commit comments

Comments
 (0)