Elasticsearch Cluster Health watch Watcher

Hi Team,

I am trying to create a watcher for cluster health check (Clluster is 3 master and 5 data node ) as per Elastic documentation

In the input section it is referred to provide host as host:localhost

"input" : {
"http" : {
"request" : {
"host" : "localhost",
"port" : 9200,
"path" : "/_cluster/health"
}

What can we give if we are using a loadbalancing URL (ex: myelasticportal.company.com) as my elastic URL .

We tried giving URL as host, server ip of datanode as host which didnot worked.
Any suggestions please.

What is the error? If the watcher does not work it will generate an error that you can check in the Logs or in Kibana.

Yes There is error below -
type": "unknown_host_exception",
"reason": "https: Temporary failure in name resolution"

This is the error when we give individual servername/server ip/ cluster URL

You got the same error when using these 3 different settings?

Setting an IP address would not generate a resolution failure I think.

Using localhost should also not give a resolution name error. Can you share how your elasticsearch.yml looks like?

What is the return of curl http://localhost:9200/_cluster/health from one of your nodes?

curl http://localhost:9200/_cluster/health - This is the error
Failed to connect to localhost port 9200: Connection refused

curl http://my actual host name :9200/_cluster/health
Could not resolve host: myactualhostname

curl http://serverip :9200/_cluster/health
(When I gave server IP)
Got below error
Empty reply from server

I am getting response for curl when I tried

curl -u username:password https://mynetworkhostname :9200/_cluster/health

You are using https then, you need to configure it in the input according to the documentation.

You need to set request.scheme to https, if you do not set it, http will be used.

When I give https as scheme and host: "mynetworkhostname"

Am getting beow error

"root_cause": [
{
"type": "s_s_l_handshake_exception",
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"
}
],

Yeah, you will need to configure the watcher settings according to the documentation.

Basically you will need to pass the path where the certificate CA is.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.