This topic describes how to modify the YML configuration of your Alibaba Cloud Elasticsearch cluster. For example, you can enable Auto Indexing, Index Deletion, Audit Log Indexing, and Watcher, and specify Other Configurations.

Procedure

  1. Log on to the Alibaba Cloud Elasticsearch console.
  2. In the top navigation bar, select the region where your Alibaba Cloud Elasticsearch cluster resides.
  3. Find the target cluster and click its ID.
  4. In the left-side navigation pane of the cluster details page, click Cluster Configuration.
  5. On the Cluster Configuration page, click Modify Configuration on the right side of YML Configuration.
  6. In the YML Configuration pane, specify the required parameters.
    YML configuration
    Parameter Description
    Auto Indexing This parameter specifies whether to automatically create an index if a new file is uploaded to an Elasticsearch cluster but no index has been created. We recommend that you disable Auto Indexing because indexes created by this feature may not meet your business requirements.

    The configuration item in the YML file for this parameter is action.auto_create_index. The default value is false.

    Index Deletion This parameter specifies whether to specify the index name when you delete an index. If you select Allow Wildcards, you can use wildcards to delete multiple indexes at a time. You cannot restore the indexes that have been deleted. Exercise caution when configuring this item.

    The configuration item in the YML file for this parameter is action.destructive_requires_name. The default value is false.

    Audit Log Indexing If you enable Audit Log Indexing, index logs are generated when you create, delete, modify, or search an index in your Elasticsearch cluster. These logs consume disk space and affect cluster performance. We recommend that you disable Audit Log Indexing. Exercise caution when configuring this item.
    Note This parameter is unavailable for Elasticsearch V7.4.0 clusters.

    The configuration item in the YML file for this parameter is xpack.security.audit.enabled. The default value is false.

    Watcher If you enable Watcher, you can use the X-Pack Watcher feature. Make sure that you clear the .watcher-history* index at regular intervals to save disk space.

    The configuration item in the YML file for this parameter is xpack.watcher.enabled. The default value is false.

    Other Configurations The following content lists some supported configuration items. These items are available for Elasticsearch V5.X, V6.X, and V7.X unless otherwise specified.
    • Configure CORS
      • http.cors.enabled
      • http.cors.allow-origin
      • http.cors.max-age
      • http.cors.allow-methods
      • http.cors.allow-headers
      • http.cors.allow-credentials
    • Recreate indexes by calling the Reindex operation

      reindex.remote.whitelist

    • Configure the audit log indexing feature
      • xpack.security.audit.enabled
      • xpack.security.audit.index.bulk_size
      • xpack.security.audit.index.flush_interval
      • xpack.security.audit.index.rollover
      • xpack.security.audit.index.events.include
      • xpack.security.audit.index.events.exclude
      • xpack.security.audit.index.events.emit_request_body
    • Configure queue sizes
      • thread_pool.bulk.queue_size (available for Elasticsearch V5.X)
      • thread_pool.write.queue_size (available for Elasticsearch V6.X and V7.X)
      • thread_pool.search.queue_size
    • Custom SQL plug-in configuration

      xpack.sql.enabled

      Elasticsearch uses the X-Pack built-in SQL plug-in by default. To upload a custom SQL plug-in, set xpack.sql.enabled to false.

    Warning After you modify YML Configuration of your Elasticsearch cluster, the system performs a rolling restart on the cluster for the modifications to take effect. If replicas are configured for the indexes in your cluster, the rolling restart does not affect your services. If replicas are not configured for the indexes in your cluster, the rolling restart may affect your services. Therefore, make sure that you want to proceed with the modifications. We recommend that you modify the YML configuration during off-peak hours.
  7. In the lower part of the pane, select the This operation will restart the cluster. Continue? check box and click OK.
    The Elasticsearch cluster restarts. You can view the restart progress in the Tasks dialog box. After the cluster is restarted, the YML configuration is updated.