Cross cluster replication questions

Hi!
I have few questions about cross-cluster replication.
I configured two clusters:

  1. opm-1(master), opd-1(date), opk-1(kibana)
  2. opm-2(master), opd-2(date), opk-2(kibana)

Questons:

  1. All security indices have replica. Is it automatic?
  2. All indices with replica have yellow status. How to see why?
  3. How to watch is index replica or original?
  4. How to watch only replicated indices?
  5. How to delete replicated index?
  6. Does replicated index replicate back if it satisfied the conditions? For example, if I have pattern “*” on each cluster.

  1. Yes, it have replica by default
  2. No idea xD
  3. Check cluster setting, if it doesn’t have seeds for cluster remote, it is master.
    4,5. You may want to read the document here: Cross-cluster replication - OpenSearch documentation
  4. I don’t think so since it already replicated to the slave ( follower ) cluster

You may want to read my post: Several question related to Cross-Cluster replication ( awesome feature of Opensearch ) - #3 by amkhar

  1. thank you
  2. Ok :slight_smile:
  3. I have bidirectional replication, so some indices from first cluster, some from second. In ELK is mark for follower index, there isn’t.
  4. I read this documentation and there is command to show all indices if index have rep > 0 it’s with replica, but is there a command to see only replicated indices?
  5. Replicated index have read only rights, so I can’t delete it while replication works, but i want delete index without deleting replication rule, or switching off it.
  6. bidirectional replication, so this question important for me, but i can see it by myself.
  1. I’m not sure but I don’t think there is API implement for that
  2. You have to stop replicating for specific index as the post I post above for request feature xD
  1. All security indices have replica. Is it automatic?

Yes, security index has auto-expand-replica configured. It is from the security plugin

  1. All indices with replica have yellow status. How to see why?

Could you check with the following api to understand the allocation information for the corresponding shard and index in the cluster?

GET _cluster/allocation/explain
{
  "index": "test-index",
  "shard": 0,
  "primary": false
}
  1. How to watch is index replica or original?
  2. How to watch only replicated indices?

You can check the relevant information by invoking follower_stats on the cluster. Ref: API - OpenSearch documentation
This should give information on the individual follower indices on the cluster. If the index is not present in the response, the index is not a follower index(/replicating index).

  1. How to delete replicated index?

To delete the follower index, you will have to invoke _stop API on the index and proceed with the deletion.

  1. Does replicated index replicate back if it satisfied the conditions? For example, if I have pattern “*” on each cluster.

If you have autofollow pattern setup on the follower cluster with * as index pattern and if the index is not present on the follower cluster, It will get created.