Hi!
I have few questions about cross-cluster replication.
I configured two clusters:
- opm-1(master), opd-1(date), opk-1(kibana)
- opm-2(master), opd-2(date), opk-2(kibana)
Questons:
- All security indices have replica. Is it automatic?
- All indices with replica have yellow status. How to see why?
- How to watch is index replica or original?
- How to watch only replicated indices?
- How to delete replicated index?
- Does replicated index replicate back if it satisfied the conditions? For example, if I have pattern “*” on each cluster.
- Yes, it have replica by default
- No idea xD
- 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
- 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
- All security indices have replica. Is it automatic?
Yes, security index has auto-expand-replica configured. It is from the security plugin
- 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
}
- How to watch is index replica or original?
- 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).
- 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.
- 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.