Acceldata
Pulse

Last updated: Dec 05, 2026 00:27 IST

Modify MongoDB and Elasticsearch Cleanup Configuration

Important

Do not modify the cleanup configuration or perform the following steps unless explicitly instructed by Acceldata Support. If configuration changes are required, contact the Acceldata Customer Support team.

Limitations and Considerations

Before modifying the MongoDB or Elasticsearch cleanup configuration, review the following limitations and guidelines.

Limitation

Description

Retention configuration

Use the Configuration tab in the Pulse UI to modify retention periods, cleanup hours, cron schedules, and cleanup history retention. Do not use APIs for routine retention changes.

Engineering approval

Obtain approval from Acceldata Engineering before adding collections or modifying filters, sharding settings, connection URIs, or TLS settings.

Direct MongoDB modifications

Do not directly modify the gauntlet.mongo or gauntlet.elastic documents in MongoDB.

Retrieve the current configuration

Always retrieve the current configuration using a GET request before submitting a PUT request. Do not reconstruct the configuration from previous configurations or YAML files.

Complete configuration required

Include the complete configuration in the PUT request. Submitting a partial or incomplete configuration might remove existing collections or index rules.

Default configuration restoration

If required default collections or rules are missing when you save the configuration, the service might restore them. Do not rely on this behavior to recover missing configuration settings.

Connection settings

Do not modify connection URIs, encryption flags, TLS paths, or Elasticsearch addresses unless instructed by Acceldata Engineering. Incorrect values might cause cleanup operations to fail for the cluster.

Sharding settings

Do not modify the is_sharded parameter or shard key mappings unless instructed by Acceldata Engineering. These settings affect zone range updates. Incorrect values might result in improper handling of sharded data.

Cluster identification

Specify the exact Pulse cluster ID (for example, odp_inosuke). An incorrect cluster ID might update the wrong cluster or cause the request to fail.

Authentication

Provide valid Basic authentication credentials for all API requests. Requests without valid credentials are rejected.

Configuration validation

Always perform a dry run after modifying the configuration structure and before performing a cleanup that deletes data.

Scheduled MongoDB cleanup

Scheduled MongoDB cleanup continues to run only during the configured Mongo Cleanup Hours, even after configuration changes. Manual cleanup using the /snap/mongo endpoint is not subject to these hours.

Elasticsearch retention

The range parameter specifies the number of most recent matching indices to retain, not the number of calendar days.

Deprecated YAML configuration

Starting with Pulse 4.2.0, the YAML-based retention configuration workflow is deprecated. Do not use accelo config retention or modify gauntlet_*.yml files and apply changes using push-config.

Important

Perform API-based configuration changes only under the guidance of Acceldata Engineering. Contact the Acceldata Customer Support team if configuration changes are required.

A. Modify the MongoDB Cleanup Configuration

Step 1: Retrieve the current configuration

Run the following command to retrieve the existing MongoDB cleanup configuration for the cluster:

curl --location 'http://<pulse-host>:19066/v1/clusters/<CLUSTER_NAME>/mongo' \
  --header 'Authorization: Basic <BASE64_ENCODED_CREDENTIALS>'

Step 2: Save the configuration

Create a file named mongo-config-updated.json and save the complete JSON response to the file.

Use the existing configuration as the basis for your changes instead of creating a new configuration file.

Step 3: Modify the required configuration

Open the mongo-config-updated.json file and modify only the required parameters.

The following table lists common configuration changes:

Configuration change

Parameter or location

Add a collection for cleanup

collections under the keep block

Modify the retention period for a collection

range (in days)

Modify the timestamp field or format

query_field and format

Enable or disable compaction

compact

For example, to add the yarn_hive_config collection with a retention period of 15 days, add the following entry to the collections list under an existing keep block:

{
    "collection": "yarn_hive_config",
    "query_field": "time",
    "range": 15,
    "format": "unix_nano_milli"
}

Step 4: Apply the updated configuration

Save the changes to mongo-config-updated.json and run the following command to apply the updated configuration:

curl --location --request PUT 'http://<pulse-host>:19066/v1/clusters/<CLUSTER_NAME>/mongo' \
  --header 'Authorization: Basic <BASE64_ENCODED_CREDENTIALS>' \
  --header 'Content-Type: application/json' \
  --data @mongo-config-updated.json

Step 5: Validate the configuration

Run the following command to perform a dry run and verify the data eligible for cleanup:

curl --location 'http://<pulse-host>:19066/v1/snap/mongo' \
  --header 'Authorization: Basic <BASE64_ENCODED_CREDENTIALS>' \
  --header 'Content-Type: application/json' \
  --data '{
    "cluster": "<CLUSTER_NAME>",
    "dry_run": true
  }'

B. Modify the Elasticsearch Cleanup Configuration

Step 1: Retrieve the current configuration

Run the following command to retrieve the existing Elasticsearch cleanup configuration for the cluster:

curl --location 'http://<pulse-host>:19066/v1/clusters/<CLUSTER_NAME>/elastic' \
  --header 'Authorization: Basic <BASE64_ENCODED_CREDENTIALS>'

Step 2: Save the configuration

Create a file named elastic-config-updated.json and save the complete JSON response to the file.

Use the existing configuration as the basis for your changes instead of creating a new configuration file.

Step 3: Modify the required configuration

Open the elastic-config-updated.json file and modify only the required parameters.

The following table lists common configuration changes:

Configuration change

Parameter or location

Modify the number of most recent indices to retain for a pattern

range

Add or modify an index pattern

filter and value

Modify the expected date format

format (for example, yyyy.mm.dd)

For example, update the indices list in the JSON configuration as follows:

"indices": [
    {
        "filter": "regex",
        "value": "*",
        "range": 6
    },
    {
        "filter": "regex",
        "value": "*hdfs-audit*",
        "range": 2
    },
    {
        "filter": "regex",
        "value": "*hdfs-log*",
        "range": 5
    }
]

Important

The range value for each newly added index pattern must be less than or equal to the range value of the global index pattern (*).

For example, if the global index pattern is configured as follows, the range value for individual index patterns must not exceed 6.

{
    "filter": "regex",
    "value": "*",
    "range": 6
}

Step 4: Apply the updated configuration

Save the changes to elastic-config-updated.json and run the following command to apply the updated configuration:

curl --location --request PUT 'http://<pulse-host>:19066/v1/clusters/<CLUSTER_NAME>/elastic' \
  --header 'Authorization: Basic <BASE64_ENCODED_CREDENTIALS>' \
  --header 'Content-Type: application/json' \
  --data @elastic-config-updated.json

Step 5: Validate the configuration

Run the following command to perform a dry run and verify the indices eligible for cleanup:

curl --location 'http://<pulse-host>:19066/v1/snap/elastic' \
  --header 'Authorization: Basic <BASE64_ENCODED_CREDENTIALS>' \
  --header 'Content-Type: application/json' \
  --data '{
    "cluster": "<CLUSTER_NAME>",
    "dry_run": true
  }'