Adopt the Telemetry service

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 Red Hat OpenStack Platform (RHOSP) 17.1 environment.

Before you begin

  • The director environment is running (the source cloud).
  • The Single Node OpenShift or OpenShift Local is running in the Red Hat OpenShift Container Platform (RHOCP) cluster.
  • Previous adoption steps are completed.

About this task

If you adopt Telemetry services, the observability solution that is used in the RHOSP 17.1 environment, Service Telemetry Framework, is removed from the cluster. The new solution is deployed in the Red Hat OpenStack Services on OpenShift (RHOSO) 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 RHOSO environment. For information about adopting legacy autoscaling stack templates to the RHOSO environment, see Adopting Autoscaling services.

Procedure

  1. Patch the OpenStackControlPlane CR to deploy cluster-observability-operator:
    $ oc create -f - <<EOF
    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 wait --for jsonpath="{.status.phase}"=Succeeded csv --namespace=openshift-operators -l operators.coreos.com/cluster-observability-operator.openshift-operators
  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
    '
  4. 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
    '

Results

  1. Verify that the alertmanager and prometheus pods are available:
    $ oc get pods -l alertmanager=metric-storage
    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
    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 | 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 controlplane --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
    '

What to do next

  1. Optional: Patch the OpenStackControlPlane CR to include logging:
    $ oc patch openstackcontrolplane openstack --type=merge --patch '
    spec:
      telemetry:
        template:
          logging:
            enabled: false
            ipaddr: 172.17.0.80
            port: 10514
            cloNamespace: openshift-logging
    '