Adopting Telemetry services

To adopt Telemetry services, you patch an existing OpenStackControlPlane custom resource (CR) that has Telemetry services disabled to start the service with the configuration parameters that are provided by the {rhos_prev_long} ({OpenStackShort}) {rhos_prev_ver} environment.

If you adopt Telemetry services, the observability solution that is used in the {OpenStackShort} {rhos_prev_ver} environment, Service Telemetry Framework, is removed from the cluster. The new solution is deployed in the {rhos_long} environment, allowing for metrics, and optionally logs, to be retrieved and stored in the new back ends.

You cannot automatically migrate old data because different back ends are used. Metrics and logs are considered short-lived data and are not intended to be migrated to the {rhos_acro} environment. For information about adopting legacy autoscaling stack templates to the {rhos_acro} environment, see Adopting Autoscaling services.

Prerequisites
  • The {OpenStackPreviousInstaller} environment is running (the source cloud).

  • Previous adoption steps are completed.

Procedure
  1. Patch the OpenStackControlPlane CR to deploy cluster-observability-operator:

    cat << EOF | oc apply -f -
    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: cluster-observability-operator
      namespace: openshift-operators
    spec:
      channel: stable
      installPlanApproval: Automatic
      name: cluster-observability-operator
      source: redhat-operators
      sourceNamespace: openshift-marketplace
    EOF
  2. Wait for the installation to succeed:

    oc get clusterserviceversion -n openshift-operators  -o custom-columns=Name:.metadata.name,Phase:.status.phase
  3. Patch the OpenStackControlPlane CR to deploy Ceilometer services:

    oc patch openstackcontrolplane openstack --type=merge --patch '
    spec:
      telemetry:
        enabled: true
        template:
          ceilometer:
            passwordSelector:
              ceilometerService: CeilometerPassword
            enabled: true
            secret: osp-secret
            serviceUser: ceilometer
          logging:
            enabled: false
            port: 10514
            cloNamespace: openshift-logging
    '
  4. Optional - Enable the metrics storage back end:

    oc patch openstackcontrolplane openstack --type=merge --patch '
    spec:
      telemetry:
        template:
          metricStorage:
            enabled: true
            monitoringStack:
              alertingEnabled: true
              scrapeInterval: 30s
              storage:
                strategy: persistent
                retention: 24h
                persistent:
                  pvcStorageRequest: 20G
    '
Verification
  1. Verify that the alertmanager and prometheus pods are available:

    oc get pods -l alertmanager=metric-storage -n openstack
    NAME                            READY   STATUS    RESTARTS   AGE
    alertmanager-metric-storage-0   2/2     Running   0          46s
    alertmanager-metric-storage-1   2/2     Running   0          46s
    
    oc get pods -l prometheus=metric-storage -n openstack
    NAME                          READY   STATUS    RESTARTS   AGE
    prometheus-metric-storage-0   3/3     Running   0          46s
  2. Inspect the resulting Ceilometer pods:

    CEILOMETETR_POD=`oc get pods -l service=ceilometer -n openstack | tail -n 1 | cut -f 1 -d' '`
    oc exec -t $CEILOMETETR_POD -c ceilometer-central-agent -- cat /etc/ceilometer/ceilometer.conf
  3. Inspect enabled pollsters:

    oc get secret ceilometer-config-data -o jsonpath="{.data['polling\.yaml\.j2']}"  | base64 -d
  4. Optional: Override default pollsters according to the requirements of your environment:

    oc patch openstackcontrolplane openstack --type=merge --patch '
    spec:
      telemetry:
        template:
          ceilometer:
              defaultConfigOverwrite:
                polling.yaml.j2: |
                  ---
                  sources:
                    - name: pollsters
                      interval: 100
                      meters:
                        - volume.*
                        - image.size
              enabled: true
              secret: osp-secret
    '