Master node query

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
teirekos
Posts: 110
Joined: Wed Nov 26, 2014 6:06 am

Master node query

Post 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.
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Master node query

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
teirekos
Posts: 110
Joined: Wed Nov 26, 2014 6:06 am

Re: Master node query

Post by teirekos »

Clarified. Pls close the thread.

Thanx.
Locked