Analytics running out of disk space on VMware

If your Analytics data is taking up too much disk space, complete the following steps to resolve the problem.

About this task

Analytics indices taking up too much space

Procedure

  1. SSH into the server:
    1. Run the following command to connect as the API Connect administrator, replacing ip_address with the appropriate IP address:
      ssh ip_address -l apicadm
    2. When prompted, select Yes to continue connecting.
    3. When you are connected, run the following command to receive the necessary permissions for working directly on the appliance:
      sudo -i
  2. Run the following command to display the indices:
    curl_es _cat/indices?v
  3. Find the old and large indices that can be deleted, and delete each index using the following command:
    curl_es -XDELETE <index_name>
  4. Reduce the retention period from the Cloud manager:
    1. Open Cloud Manager and click Topology > Analytics Service > Advanced analytics configuration > Storage.
    2. Locate the Oldest Api Call Data Kept field and set it to the lowest feasible value.
  5. Verify that the index is rotating as scheduled.
    1. Open Cloud Manager and click Topology > Analytics Service > Advanced analytics configuration > Storage.
    2. Click Index Roll Over > Max age and Max Documents.

      Check the rotation time and number of documents.

  6. Verify that the retention and rollover jobs are running properly.

    Run the following command to check the age of the job and the logs, to see whether there is any issue:

    kubectl get jobs

    The output looks like the following example:

    NAME                                                 COMPLETIONS   DURATION   AGE
    analyt-cj-retention-1632965400                     1/1           17s        21h
    analyt-cj-rollover-1633040100                      1/1           10s        15m
  7. Apply a filter to reduce the index size is by excluding large fields, such as response_body, from being saved in the index.

    For example:

    filter {
      if "apicapievent" in [tags] {
         mutate {
                remove_field => ["response_body"]
            }
      }
    }

    For information on creating filters for Analytics data, see Modifying your analytics data.