How to get the cluster running status using java elastic API?


(Sam-4) #1

Hi

I want to check whether elastic search server running or not and which
state it give me information that server running nicely.

Thanks


(Kun Niu) #2

You can try admin method from trasportclient class.

-----Original Message-----
From: elasticsearch@googlegroups.com
[mailto:elasticsearch@googlegroups.com] On Behalf Of sam
Sent: 2011年8月26日 13:36
To: elasticsearch
Subject: How to get the cluster running status using java elastic API?

Hi

I want to check whether elastic search server running or not and which
state
it give me information that server running nicely.

Thanks


(Sam-4) #3

Thanks for your reply.but i'm not connect remotely to an elasticsearch
cluster.which class and method will help me to get for local servers
status. also any available document that help me to understand
elastic java library beside available java docs for that.

On Aug 26, 10:37 am, "Kun Niu" haoniu...@gmail.com wrote:

You can try admin method from trasportclient class.

-----Original Message-----
From: elasticsearch@googlegroups.com
[mailto:elasticsearch@googlegroups.com] On Behalf Of sam
Sent: 2011年8月26日 13:36
To: elasticsearch
Subject: How to get the cluster running status using java elastic API?

Hi

I want to check whether elastic search server running or not and which
state
it give me information that server running nicely.

Thanks


(Shay Banon) #4

You first need to get a reference to a Client, for this type of operations,
I suggest using the TransportClient. More info here:
http://www.elasticsearch.org/guide/reference/java-api/client.html.

Once you have a client, check the Client#admin().cluster().prepareXXX
operations, for example, health, node stats, node info.

2011/8/26 sam mishra.sameek@gmail.com

Thanks for your reply.but i'm not connect remotely to an elasticsearch
cluster.which class and method will help me to get for local servers
status. also any available document that help me to understand
elastic java library beside available java docs for that.

On Aug 26, 10:37 am, "Kun Niu" haoniu...@gmail.com wrote:

You can try admin method from trasportclient class.

-----Original Message-----
From: elasticsearch@googlegroups.com
[mailto:elasticsearch@googlegroups.com] On Behalf Of sam
Sent: 2011年8月26日 13:36
To: elasticsearch
Subject: How to get the cluster running status using java elastic API?

Hi

I want to check whether elastic search server running or not and which
state
it give me information that server running nicely.

Thanks


(system) #5