kibana/x-pack/plugins/cross_cluster_replication
Alejandro Fernández Haro e98b4b3e88
[config-schema] offeringBasedSchema helper (#163786)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2023-08-22 03:59:15 -07:00
..
common fix all violations 2022-04-16 01:37:30 -05:00
public [CCR] Migrate all usages of EuiPage*_Deprecated (#163135) 2023-08-17 13:40:18 -04:00
server [config-schema] offeringBasedSchema helper (#163786) 2023-08-22 03:59:15 -07:00
jest.config.js [jest] update config files to get coverage per plugin (#111299) 2021-09-09 08:14:56 +02:00
kibana.jsonc [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.md Migrate Index Management and enrichers to the new ES JS client (#105863) 2021-08-02 10:20:54 -07:00
tsconfig.json [Shared UX] Adoption of Shared UX Route component (#150357) 2023-02-14 19:25:04 +00:00

Cross-Cluster Replication

Quick steps for testing cross-cluster replication

You can run a local cluster and simulate a remote cluster within a single Kibana directory.

  1. Ensure Kibana isn't running so it doesn't load up any data into your cluster. Run yarn es snapshot --license=trial to install a fresh snapshot. Wait for ES to finish setting up and activate the license.
  2. Create a "remote" copy of your ES snapshot by running: cp -R .es/8.0.0 .es/8.0.0-2.
  3. Start your "local" cluster by running .es/8.0.0/bin/elasticsearch.
  4. Run yarn start to start Kibana so that it connects to the "local" cluster.
  5. Start your "remote" cluster by running .es/8.0.0-2/bin/elasticsearch -E cluster.name=europe -E transport.port=9400.
  6. Index a document into your "remote" cluster by running curl -X PUT http://elastic:changeme@localhost:9201/my-leader-index --data '{"settings":{"number_of_shards":1,"soft_deletes.enabled":true}}' --header "Content-Type: application/json". Note that these settings are required for testing auto-follow pattern conflicts errors (see below).

Now you can create follower indices and auto-follow patterns to replicate the my-leader-index index on the "remote" cluster that's available at 127.0.0.1:9400.

Auto-follow pattern conflict errors

You can view conflict errors by creating two auto-follow patterns with overlapping patterns (e.g. my* and my-*) that will both capture the my-leader-index index on your remote cluster. Run the curl command to create my-leader-index2 on your remote cluster, since auto-follow patterns don't replicate existing indices.

Now, when you open the details flyout of one of the auto-follow patterns you will see a list of recent errors.

image