Update the Analytics CR to configure data offloading from your IBM® API
Connect Analytics deployment
to a third-party system.
About this task
On Kubernetes, add your changes to the spec
section of the Analytics CR. On
OpenShift or Cloud Pak for Integration, add your changes to the spec.analytics
section of the top-level CR.
For information about offloading data from your Analytics deployment, see Planning to offload data to a third-party system.
Procedure
-
Open the analytics_cr.yaml file for editing.
-
Add the following section to the
spec
section of the CR:
Kubernetes:
spec:
external:
offload:
enabled: true
output: |
$EXTERNAL_OFFLOAD_OUTPUT
OpenShift and Cloud Pak for Integration:
spec:
analytics:
external:
offload:
enabled: true
output: |
$EXTERNAL_OFFLOAD_OUTPUT
where $EXTERNAL_OFFLOAD_OUTPUT
is the plugin output for the target third-party
system.
For example, the following example enables offloading to HTTP from a Kubernetes deployment:
spec:
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.
- 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 from a Kubernetes
deployment, and provides information on the certificate that is needed for authenticating with the
endpoint:
spec:
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.
For information on creating a secret to store the certificates, see Providing a custom certificate for Analytics offload.
- Optional:
Add a
filter
after the output plugin to modify data
prior to offloading it.
The following example filter for a Kubernetes deployment removes the
query_string
field:
spec:
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 analytics data.
-
Save the file.
What to do next
If you do not want to add any more configuration options, skip to the topic on Defining your internal storage space, which is the last step before running the
installation.
Otherwise, continue adding configuration options to the CR as explained in the following
topics.