Shutting down the analytics subsystem
Disable the analytics service and shutdown the analytics subsystem.
About this task
This operation requires the use of the analytics CLI.
Disabling the analytics subsystem stops the collection and storage of data and makes the subsystem inaccessible.
Procedure
- Backup your analytics data as explained in Backup, restore, and disaster recovery.
- Setup the toolkit CLI so you can run analytics CLI operations: Analytics CLI.
- Optional:
Disable shard allocation.
Disable shard allocation to prevent new shards from being created for replication when a node is unavailable. For more information about shards, see OpenSearch nodes, indices, shards, and replicas.
- Create a JSON file called
analytics_persistent_settings.json
and insert the contents:{"persistent":{"cluster.routing.allocation.enable":"none"}}
- Run the following analytics CLI
command:
where:apic --mode analytics clustermgmt:putSettings --server <platform api endpoint> --analytics-service <analytics service name> --format json analytics_persistent_settings.json
<platform api endpoint>
is the platform API endpoint.<analytics service name>
is the name of analytics service as configured in the Cloud Manager UI.
Expected output:{"acknowledged":true,"persistent":{"cluster":{"routing":{"allocation":{"enable":"none"}}}},"transient":{}}
- Create a JSON file called
- Optional:
Run a synced flush of storage.
The synced flush operation flushes all current index operations synchronously and writes all in-flight transactions to disk.
where:apic --mode analytics clustermgmt:postFlush --server <platform api endpoint> --analytics-service <analytics service name> --format json
<platform api endpoint>
is the platform API endpoint.<analytics service name>
is the name of analytics service as configured in the Cloud Manager UI.
When you flush storage, the response looks like the following example, with the failed count set to zero:{ "_shards": { "total": 16, "successful": 6, "failed": 0 } }
This operation occasionally fails, but it is safe to rerun it multiple times until it passes and the
failed
count is zero. -
Unassociate the analytics service from all gateway services.
- In Cloud Manager, click Topology.
- In the section for the Availability Zone that contains the analytics service, locate the Gateway service that the analytics service is associated with.
- Click and select Unassociate.
For more information, see Associating an analytics service with a gateway service.
-
Unregister the analytics service from Cloud Manager:
- In Cloud Manager, click Topology.
- In the section for the Availability Zone that contains the analytics service, locate the analytics service and click Delete.
For more information, see Registering an analytics service.
-
Kubernetes, OpenShift, and Cloud Pak for Integration only: Set replicas to zero
for the analytics pods by editing the Deployments and StatefulSets that manage them:
director
,mtls-gw
,ingestion
, andstorage
:kubectl -n <namespace> edit deploy analytics-director kubectl -n <namespace> edit deploy analytics-mtls-gw kubectl -n <namespace> edit sts analytics-ingestion kubectl -n <namespace> edit sts analytics-storage
Note: The Deployments and StatefulSets on Cloud Pak for Integration and OpenShift with the top-level CR have the name format <instance name>-a7s-...Set replicas to zero:spec: ... replicas: 0 ...
The analyticsdirector
,mtls-gw
,ingestion
, andstorage
pods all terminate.
Reenabling the analytics subsystem
- Kubernetes, OpenShift, and Cloud Pak for Integration only: Repeat step 7 but in reverse order and setting the
replicas value back to what it was before. The pods all start:
kubectl get deploy -n <namespace> analytics-director 1/1 1 1 7h10m analytics-mtls-gw 1/1 1 1 7h6m kubectl get sts -n <namespace> analytics-ingestion 1/1 7h10m analytics-storage 1/1 7h12m
- Reregister the analytics service: Registering an analytics service.
- Reassociate your analytics service with your gateways Associate new analytics service(s) with gateway(s).
-
Enable shard allocation by following these steps:
Note: If you did not disable shard allocation in step 3, skip this step.
- Create a JSON file called
analytics_persistent_settings.json
and insert the contents:{"persistent":{"cluster.routing.allocation.enable":"all"}}
- Run the following analytics CLI command:
where:apic --mode analytics clustermgmt:putSettings --server <platform api endpoint> --analytics-service <analytics service name> --format json analytics_persistent_settings.json
<platform api endpoint>
is the platform API endpoint.<analytics service name>
is the name of analytics service as configured in the Cloud Manager UI.
When you enable shard allocation, the response looks like the following example:{"acknowledged":true,"persistent":{"cluster":{"routing":{"allocation":{"enable":"all"}}}},"transient":{}}
- Create a JSON file called