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