Dear experts
I've had one elasticsearch server at home for a few months now and it's been working well for a few months. However, with an power outage I lost a few indices and looking around it seems like having a cluster would have avoided at least part of the "damage done".
Thus I started with creating a two more elastic search servers, one master with no node data, and another data node. However, I have not been able to get it working so I am hoping to get some pointers here.
It looks like data has been replicated between the data nodes but the data nodes only shows as one when issuing the cluster status command. The data nodes has the same cluster_uuid but the master node does not. Kibana also shows only one node even though I configure it to use all three.
Any ideas?
Master node (no data)
cluster.name: siem
node.name: siem-master
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.70.162
http.port: 9200
discovery.seed_hosts:
- 192.168.70.150
- 192.168.70.161
- 192.168.70.162
cluster.initial_master_nodes:
- siem-master
- siem-1
- siem-2
node.data: false
Data node 1
cluster.name: siem
node.name: siem-1
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.70.150
http.port: 9200
discovery.seed_hosts:
- 192.168.70.150
- 192.168.70.161
- 192.168.70.162
cluster.initial_master_nodes:
- siem-master
- siem-1
- siem-2
cluster.max_shards_per_node: 2000
Data node 2
cluster.name: siem
node.name: siem-2
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 192.168.70.161
http.port: 9200
discovery.seed_hosts:
- 192.168.70.150
- 192.168.70.161
- 192.168.70.162
cluster.initial_master_nodes:
- siem-master
- siem-1
- siem-2
cluster.max_shards_per_node: 2000
Cluster status output
{
"cluster_name" : "siem",
"status" : "red",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 0,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 2,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 0.0
}
Master Node: siem-master/_cluster/health?pretty
{
"cluster_name" : "siem",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 1961,
"active_shards" : 1961,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 14,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 99.29113924050633
}
Data Node 1: siem-2/_cluster/health?pretty
{
"cluster_name" : "siem",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 1957,
"active_shards" : 1957,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 11,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 99.4410569105691
}