Chapter 6. Administrative tasks

6.1. Starting Monitoring, Alerting, and Telemetry

To make sure CodeReady Containers can run on a typical laptop, some resource-heavy services get disabled by default. One of these is Prometheus and the related monitoring, alerting, and telemetry functionality. Telemetry functionality is responsible for listing your cluster in the Red Hat OpenShift Cluster Manager.

Prerequisites

  • A running CodeReady Containers virtual machine and a working oc command. For more information, see Accessing the OpenShift cluster with oc.
  • You must log in through oc as the kubeadmin user.
  • You must assign additional memory to the CodeReady Containers virtual machine. At least 14 GiB of memory (a value of 14336) is recommended for core functionality. Increased workloads will require more memory. For more information, see Configuring the virtual machine.

Procedure

  1. Run the oc edit clusterversion version command and append the following lines to the output:

    $ oc edit clusterversion version
    ....
      - kind: Deployment
        group: apps/v1
        name: etcd-quorum-guard
        namespace: openshift-etcd
        unmanaged: true
  2. Run the following commands:

    $ oc scale --replicas=1 deployment etcd-quorum-guard -n openshift-etcd
    $ oc delete validatingwebhookconfigurations prometheusrules.openshift.io
  3. List unmanaged Operators and note the numeric index for cluster-monitoring-operator:

    • On Linux or macOS:

      $ oc get clusterversion version -ojsonpath='{range .spec.overrides[*]}{.name}{"\n"}{end}' | nl -v 0
    • On Microsoft Windows using PowerShell:

      PS> oc get clusterversion version -ojsonpath='{range .spec.overrides[*]}{.name}{\"\n\"}{end}' | % {$nl++;"`t$($nl-1) `t $_"};$nl=0
  4. Start monitoring, alerting, and telemetry services using the identified numeric index for cluster-monitoring-operator:

    • On Linux or macOS:

      $ oc patch clusterversion/version --type='json' -p '[{"op":"remove", "path":"/spec/overrides/<cluster-monitoring-operator-index>"}]'
      clusterversion.config.openshift.io/version patched
    • On Microsoft Windows using PowerShell:

      PS> oc patch clusterversion/version --type='json' -p '[{\"op\":\"remove\", \"path\":\"/spec/overrides/<cluster-monitoring-operator-index>\"}]'