We have 4 instance NLS cluster. I would like to either isolate or delete 2 instances from the 4 instance cluster.
Is there any chance of loosing data in this case. If I just isolate the 2 instances, can I add them back at a later point of time?
Please suggest.
Remove instance from Nagios Log Server Cluster
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
Re: Remove instance from Nagios Log Server Cluster
There is a possibility of loosing data if you remove both nodes at the same time. The safer method would be to remove one node, wait for the cluster status to go back to green which indicates the data has been redistributed among the three nodes left in the cluster, and then remove the next node and again wait for the green status to indicate that the data is now distributed between the two remaining nodes.
One important note is that closed indices will not replicate. You'll need to open closed indices to allow them to replicate. A script to open closed indices to allow them to replicate can be found at https://github.com/elastic/elasticsearch/issues/12963. The steps would be:
-remove a node
-run the script
-wait for the status to go green
-remove second node
-run the script
-wait for the status to go green
https://assets.nagios.com/downloads/nag ... luster.pdf has information about isolating or removing nodes from a cluster. If you need to add nodes back to the cluster I would recommend just a new installation of NLS and then add them to the cluster as you usually do during the install process.
One important note is that closed indices will not replicate. You'll need to open closed indices to allow them to replicate. A script to open closed indices to allow them to replicate can be found at https://github.com/elastic/elasticsearch/issues/12963. The steps would be:
-remove a node
-run the script
-wait for the status to go green
-remove second node
-run the script
-wait for the status to go green
https://assets.nagios.com/downloads/nag ... luster.pdf has information about isolating or removing nodes from a cluster. If you need to add nodes back to the cluster I would recommend just a new installation of NLS and then add them to the cluster as you usually do during the install process.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
Re: Remove instance from Nagios Log Server Cluster
Thanks @cdienger.
I don't have any closed indices, so I can simply go ahead with below steps to remove the instance from cluster, right?
I don't have any closed indices, so I can simply go ahead with below steps to remove the instance from cluster, right?
Code: Select all
• Stop Elasticsearch on all instances
• Update configuration file
• Start Elasticsearch on all instances
• Verify instances in cluster
• Delete removed instanceRe: Remove instance from Nagios Log Server Cluster
That should work. To stress it again though - remove one node at a time.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
Re: Remove instance from Nagios Log Server Cluster
Definitely, one node at a time.
With respect to the script: https://github.com/elastic/elasticsearch/issues/12963, does this script help in any other case where there are "Unassigned Shards"?
I have another instance of NLS which has yellow cluster health status. It has 60 open indices and 30 closed indices.
With respect to the script: https://github.com/elastic/elasticsearch/issues/12963, does this script help in any other case where there are "Unassigned Shards"?
I have another instance of NLS which has yellow cluster health status. It has 60 open indices and 30 closed indices.
You do not have the required permissions to view the files attached to this post.
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
Re: Remove instance from Nagios Log Server Cluster
Nevermind, NLS was running on low space, hence the shards were unassigned.
Adding space fixed it.
Adding space fixed it.
Re: Remove instance from Nagios Log Server Cluster
It may help here, but I would first review https://support.nagios.com/kb/article/n ... h-469.html and run "curl -XGET 'http://localhost:9200/_cat/shards?v'" to get an idea of of which indices/shards are int this state and why. Please open a new thread if we need to examine this further.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
Re: Remove instance from Nagios Log Server Cluster
Glad to hear!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.