Page 1 of 1

Master node query

Posted: Fri Jul 31, 2015 9:46 am
by teirekos
I am a bit confused witch one from my 2 instances is my master node:

Instance 1
-----------

Code: Select all

[root@NagiosLogServer1 /]# curl 'localhost:9200/_cat/master?v'
id                     host      ip        node
tjn8sT2VTYyKsRZTyJPYcg localhost 127.0.0.1 845bc07c-ed91-4920-8e23-747c9cc699f5

[root@NagiosLogServer1 /]# curl -XGET 'localhost:9200'
{
  "status" : 200,
  "name" : "7387f4a4-c097-4c4a-9f83-22ae496b3eac",
  "cluster_name" : "2b249934-e049-4f18-96ed-db395faae965",
  "version" : {
    "number" : "1.6.0",
    "build_hash" : "cdd3ac4dde4f69524ec0a14de3828cb95bbb86d0",
    "build_timestamp" : "2015-06-09T13:36:34Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}
[root@NagiosLogServer1 /]# curl 'localhost:9200/_cat/nodes?v'
host      ip        heap.percent ram.percent load node.role master name
localhost 127.0.0.1           39          63 0.04 d         *      845bc07c-ed91-4920-8e23-747c9cc699f5
localhost 127.0.0.1           60          60 0.03 d         m      7387f4a4-c097-4c4a-9f83-22ae496b3eac

Instance 2
------------

Code: Select all

[root@NagiosLogServer2 /]# curl 'localhost:9200/_cat/master?v'
id                     host      ip        node
tjn8sT2VTYyKsRZTyJPYcg localhost 127.0.0.1 845bc07c-ed91-4920-8e23-747c9cc699f5
[root@NagiosLogServer2 /]#
[root@NagiosLogServer2 /]#
[root@NagiosLogServer2 /]# curl -XGET 'localhost:9200'
{
  "status" : 200,
  "name" : "845bc07c-ed91-4920-8e23-747c9cc699f5",
  "cluster_name" : "2b249934-e049-4f18-96ed-db395faae965",
  "version" : {
    "number" : "1.6.0",
    "build_hash" : "cdd3ac4dde4f69524ec0a14de3828cb95bbb86d0",
    "build_timestamp" : "2015-06-09T13:36:34Z",
    "build_snapshot" : false,
    "lucene_version" : "4.10.4"
  },
  "tagline" : "You Know, for Search"
}
[root@NagiosLogServer2 /]#
[root@NagiosLogServer2 /]# curl 'localhost:9200/_cat/nodes?v'
host      ip        heap.percent ram.percent load node.role master name
localhost 127.0.0.1           41          63 0.02 d         *      845bc07c-ed91-4920-8e23-747c9cc699f5
localhost 127.0.0.1           62          60 0.02 d         m      7387f4a4-c097-4c4a-9f83-22ae496b3eac


Thanx.

Re: Master node query

Posted: Fri Jul 31, 2015 11:42 am
by jolson
Your master instance is the one with a UUID of 845bc07c-ed91-4920-8e23-747c9cc699f5. In your case, your master is NagiosLogServer2.

The master output is a little bit weird, but let's take a look at my 3 nodes cluster and it may make more sense to you:
[root@localhost nagioslogserver]# curl 'localhost:9200/_cat/nodes?v'
host ip heap.percent ram.percent load node.role master name
localhost 127.0.0.1 24 86 0.00 d m 847212b3-0ae6-407f-991e-f7c9441236a4
localhost.localdomain 127.0.0.1 25 81 0.25 d m 64e489f1-c05f-4ece-93cd-43aecf31f60a
localhost.localdomain 127.0.0.1 59 78 0.00 d * 69e2ab79-2d60-45d8-833d-c04fed4c549e
You can see that 'm' means that the node isn't in a master role - the master is indicated by the asterisk.

Re: Master node query

Posted: Mon Aug 03, 2015 12:50 am
by teirekos
Clarified. Pls close the thread.

Thanx.