I'm running elasticsearch 5.5.1-1 and x-pack for monitoring.
Elasticsearch's documentation say's I should be able to add the following code to my elasticsearch.yml file for cross cluster search seeding:
search:
remote:
cluster_one:
seeds: 1.1.1.1:9300
cluster_two:
seeds: 2.2.2.2:9300
Well that didn't work so I used the API as follows:
PUT _cluster/settings
{
"persistent": {
"search": {
"remote": {
"cluster_one": {
"seeds": [
"1.1.1.1:9300"
]
},
"cluster_two": {
"seeds": [
"2.2.2.2:9300"
]
}
}
}
}
}
That worked fine however I needed to delete cluster_one until it was upgraded to 5.5.1-1 which according to elasticsearch's docs say's should be completed as follows:
PUT _cluster/settings
{
"persistent": {
"search": {
"remote": {
"cluster_one": {
"seeds": null
}
}
}
}
}
It appears to takeas I get the acknowledgement:
{
"acknowledged" : true,
"persistent" : { },
"transient" : { }
}
However if I curl the cluster settings I still see both nodes as follows:
{
"persistent" : {
"search" : {
"remote" : {
"cluster_one" : {
"seeds" : [
"1.1.1.1:9300"
]
},
"cluster_two" : {
"seeds" : [
"2.2.2.2:9300"
]
}
}
}
},
"transient" : { }
}
I wouldn't think I needed to restart elasticsearch after the API call but I tried that to no avail as well.
I also played with quoting/capitalizing null and got this return message which leads me to believe null is a valid value:
{
"error" : {
"root_cause" : [
{
"type" : "json_parse_exception",
"reason" : "Unrecognized token 'NULL': was expecting 'null', 'true', 'false' or NaN\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@6053e99; line: 7, column: 25]"
}