Offloading data to a third-party system

Update the Analytics CR to configure data offloading from your IBM® API Connect Analytics deployment to a third-party system.

About this task

For information about offloading data from your Analytics deployment, see Planning to offload data to a third-party system.

Procedure

  1. Open the analytics_cr.yaml file for editing.
  2. Add the following section to the spec section of the CR:
    
      external:
        offload:
          enabled: true
          output: |
            $EXTERNAL_OFFLOAD_OUTPUT

    where $EXTERNAL_OFFLOAD_OUTPUT is the plugin output for the target third-party system.

    The following example enables offloading to HTTP:

    
      external:
        offload:
          enabled: true
          output: |
            http {
              url => "example.com"
              http_method => "post"
              codec => "json"
              content_type => "application/json"
              id => "offload_http"
            }

    For examples of output plugins, see Sample output plugins for offloading data.

  3. Optional: Modify the output plugin to include certificates for connecting to a secure endpoint.

    If your third-party endpoint requires a particular certificate, you can configure the certificate and then reference it in the offload plugin. Include the secretName as well as the cacert, client_cert, and client_key settings.

    For example, the following output plugin enables offloading to HTTP, and provides information on the certificate that is needed for authenticating with the endpoint:

      external:
        offload:
          secretName: offload-certificates
          enabled: true
          output: |
            http {
              url => "https://example.com:443"
              http_method => "post"
              codec => "json"
              content_type => "application/json"
              id => "offload_http"
              cacert => "/etc/velox/external_certs/offload/cacert.pem"
              client_cert => "/etc/velox/external_certs/offload/client.pem"
              client_key => "/etc/velox/external_certs/offload/client.key"
            }

    The secret and its defined files are mounted to the /etc/velox/external_certs/offload directory in the ingestion pod container.

    For information on creating a secret to store the certificates, see Providing a custom certificate for Analytics offload.

  4. Optional: Add a filter after the output plugin to modify data prior to offloading it.

    The following example filter removes the query_string field:

      external:
        offload:
          enabled: true
          output: |
            http {
              url => "example.com"
              http_method => "post"
              codec => "json"
              content_type => "application/json"
              id => "offload_http"
            }
          filter: |
            ruby {
              remove_field => ["query_string"]
            }

    For information about modifying offloaded data, see Planning to modify your incoming analytics data.

  5. Save the file. If updating these settings after installation, confirm that the analytics ingestion pod restarts.