|
6 | 6 | [id="configuring-cluster-monitoring_{context}"]
|
7 | 7 | = Configuring cluster monitoring
|
8 | 8 |
|
| 9 | +[role="_abstract"] |
| 10 | +You can increase the storage capacity for the Prometheus component in the cluster monitoring stack. |
| 11 | + |
9 | 12 | .Procedure
|
10 | 13 |
|
11 | 14 | To increase the storage capacity for Prometheus:
|
12 | 15 |
|
13 |
| -. Create a YAML configuration file, `cluster-monitoring-config.yml`. For example: |
| 16 | +. Create a YAML configuration file, `cluster-monitoring-config.yaml`. For example: |
14 | 17 | +
|
15 | 18 | [source,yaml]
|
16 | 19 | ----
|
17 | 20 | apiVersion: v1
|
18 | 21 | kind: ConfigMap
|
19 | 22 | data:
|
20 | 23 | config.yaml: |
|
21 |
| - prometheusOperator: |
22 |
| - baseImage: quay.io/coreos/prometheus-operator |
23 |
| - prometheusConfigReloaderBaseImage: quay.io/coreos/prometheus-config-reloader |
24 |
| - configReloaderBaseImage: quay.io/coreos/configmap-reload |
25 |
| - nodeSelector: |
26 |
| - node-role.kubernetes.io/infra: "" |
27 | 24 | prometheusK8s:
|
28 | 25 | retention: {{PROMETHEUS_RETENTION_PERIOD}} <1>
|
29 |
| - baseImage: openshift/prometheus |
30 | 26 | nodeSelector:
|
31 | 27 | node-role.kubernetes.io/infra: ""
|
32 | 28 | volumeClaimTemplate:
|
33 | 29 | spec:
|
34 |
| - storageClassName: gp2 |
| 30 | + storageClassName: {{STORAGE_CLASS}} <2> |
35 | 31 | resources:
|
36 | 32 | requests:
|
37 |
| - storage: {{PROMETHEUS_STORAGE_SIZE}} <2> |
| 33 | + storage: {{PROMETHEUS_STORAGE_SIZE}} <3> |
38 | 34 | alertmanagerMain:
|
39 |
| - baseImage: openshift/prometheus-alertmanager |
40 | 35 | nodeSelector:
|
41 | 36 | node-role.kubernetes.io/infra: ""
|
42 | 37 | volumeClaimTemplate:
|
43 | 38 | spec:
|
44 |
| - storageClassName: gp2 |
| 39 | + storageClassName: {{STORAGE_CLASS}} <2> |
45 | 40 | resources:
|
46 | 41 | requests:
|
47 |
| - storage: {{ALERTMANAGER_STORAGE_SIZE}} <3> |
48 |
| - nodeExporter: |
49 |
| - baseImage: openshift/prometheus-node-exporter |
50 |
| - kubeRbacProxy: |
51 |
| - baseImage: quay.io/coreos/kube-rbac-proxy |
52 |
| - kubeStateMetrics: |
53 |
| - baseImage: quay.io/coreos/kube-state-metrics |
54 |
| - nodeSelector: |
55 |
| - node-role.kubernetes.io/infra: "" |
56 |
| - grafana: |
57 |
| - baseImage: grafana/grafana |
58 |
| - nodeSelector: |
59 |
| - node-role.kubernetes.io/infra: "" |
60 |
| - auth: |
61 |
| - baseImage: openshift/oauth-proxy |
62 |
| - k8sPrometheusAdapter: |
63 |
| - nodeSelector: |
64 |
| - node-role.kubernetes.io/infra: "" |
| 42 | + storage: {{ALERTMANAGER_STORAGE_SIZE}} <4> |
65 | 43 | metadata:
|
66 | 44 | name: cluster-monitoring-config
|
67 |
| -namespace: openshift-monitoring |
| 45 | + namespace: openshift-monitoring |
68 | 46 | ----
|
69 | 47 | <1> A typical value is `PROMETHEUS_RETENTION_PERIOD=15d`. Units are measured in
|
70 | 48 | time using one of these suffixes: s, m, h, d.
|
71 |
| -<2> A typical value is `PROMETHEUS_STORAGE_SIZE=2000Gi`. Storage values can be a |
| 49 | +<2> The storage class for your cluster. |
| 50 | +<3> A typical value is `PROMETHEUS_STORAGE_SIZE=2000Gi`. Storage values can be a |
72 | 51 | plain integer or as a fixed-point integer using one of these suffixes: E, P, T,
|
73 | 52 | G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
|
74 |
| -<3> A typical value is `ALERTMANAGER_STORAGE_SIZE=20Gi`. Storage values can be a |
| 53 | +<4> A typical value is `ALERTMANAGER_STORAGE_SIZE=20Gi`. Storage values can be a |
75 | 54 | plain integer or as a fixed-point integer using one of these suffixes: E, P, T,
|
76 | 55 | G, M, K. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
|
77 | 56 |
|
78 |
| -. Set the values like the retention period and storage sizes. |
| 57 | +. Add values for the retention period, storage class, and storage sizes. |
| 58 | + |
| 59 | +. Save the file. |
79 | 60 |
|
80 | 61 | . Apply the changes by running:
|
81 | 62 | +
|
82 | 63 | [source,terminal]
|
83 | 64 | ----
|
84 |
| -$ oc create -f cluster-monitoring-config.yml |
| 65 | +$ oc create -f cluster-monitoring-config.yaml |
85 | 66 | ----
|
0 commit comments