Override default Telemetry service configuration

You can customize Telemetry services by creating custom configuration files for your deployment. For example, you can customize the Ceilometer service by modifying the polling.yaml file.

Before you begin

  • The pod for the service that you want to customize exists in your deployment and you are in the openstack namespace:
    $ oc get pods -A -o custom-columns="NAMESPACE:.metadata.namespace,POD:.metadata.name,CONTAINERS:.spec.containers[*].name" | grep <container>

Procedure

  1. Create the custom configuration file for the service you want to customize. If the service already has a configuration file, then you must give your custom file the same name so that your custom file replaces the existing configuration file. For example, to customize the configuration of the Ceilometer service, you can make a copy of polling.yaml for editing:
    $ oc rsh -n openstack -c ceilometer-central-agent ceilometer-0 cat /etc/ceilometer/polling.yaml > polling.yaml
  2. Add or update the configuration for the service as required. For example, to customize how often samples of volume and image size should be polled, create a file named polling.yaml and add the following configuration:
    sources:
      - name: pollsters
        interval: 300
        meters:
          - volume.size
          - image.size

    For more information on how to configure the Ceilometer service, see Polling properties.

  3. Create the Secret CR for the service with the custom configuration file:
    $ oc create secret generic <secret_name> \
     --from-file <custom_config.yaml> -n openstack
    Note
    You can specify the --from-file option as many times as required to pass more than one configuration file to the Secret CR for customizing the service.
  4. Verify that the Secret CR is created:
    $ oc describe secret <secret_name>
  5. Open the OpenStackControlPlane CR file on your workstation, for example, openstack_control_plane.yaml.
  6. Locate the service definition for telemetry and add the customConfigsSecretName field to the Telemetry service that you want to customize. The following example shows where to place the customConfigsSecretName field for each service that you can customize:
    spec:
      telemetry:
        template:
          autoscaling:
            aodh:
              customConfigsSecretName: <secret_name>
          ceilometer:
            customConfigsSecretName: <secret_name>
          cloudkitty:
            cloudKittyAPI:
              customConfigsSecretName: <secret_name>
            cloudKittyProc:
              customConfigsSecretName: <secret_name>
  7. Update the control plane:
    $ oc apply -f openstack_control_plane.yaml -n openstack

    Your custom file is copied from the Secret into the /etc/<service>/ folder. If a file with the same name already exists in the folder, it is replaced with the custom configuration file.

  8. Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status:
    $ oc get openstackcontrolplane -n openstack
  9. Verify that the custom configuration file is being used by the service:
    $ oc rsh -c <service_container> <service_pod> \
     cat /etc/<service>/<custom_config>.yaml

    Example:

    $ oc rsh -c ceilometer-central-agent ceilometer-0 cat /etc/ceilometer/polling.yaml

Polling properties

You can configure polling rules to poll for data not provided by service events and notifications, such as instance resource usage. Use the polling.yaml file to specify the polling plugins (pollsters) to enable, the interval they should be polled, and the meters to poll for each source.

The following template describes how to define a source to poll:

sources:
  - name: <source_name>
    interval: <sample_generation_interval>
    meters:
      - <meter_filter>
      - <meter_filter>
      ...
      - <meter_filter>
  • interval: The interval in seconds between sample generation of the specified metrics.
  • meters: A list of resources to gather samples from. Each filter must match the meter name of the polling plugin.