Hi Sergey,
Thanks for your reponse !
I will definitely try out the suggested cbc-stats options to get the cluster health on monitoring server.
However, I have this specific use case, wherein my application will have a monitor thread which will periodically get the cluster nodes information and based on this information, it will send an alert to the end user that a node has been added or is unavailable.
I tried the lcb_diag, but I did not got the expected response. Please find below the cases which I tried.
I have a cluster with 2 nodes (172.16.130.68 and 172.16.129.68) where 172.16.130.68 is the localhost and 172.16.129.68 is the remote host.
In case 1, I did NOT recieved the host/ip details of remote node.
But in case 2, I did recieved the host/ip details of remote node.
case 1: Running the test program on localhost, with connection string pointed to local node
options.v.v3.connstr = “couchbase://172.16.130.68/TestBucket”
The diagnostic response is as below
{“config”:[{“id”:“0x2199700”,“last_activity_us”:5004743,“local”:“172.16.130.68:45866”,“remote”:“172.16.130.68:11210”,“status”:“connected”}],“id”:“0x2194c80”,“sdk”:“libcouchbase/2.9.0”,“version”:1}
case 2: Running the test program on localhost, with connection string pointed to remote node
options.v.v3.connstr = “couchbase://172.16.129.68/TestBucket”
The diagnostic response is as below
{“config”:[{“id”:“0x2199700”,“last_activity_us”:5004743,“local”:“172.16.130.68:45866”,“remote”:“172.16.129.68:11210”,“status”:“connected”}],“id”:“0x2194c80”,“sdk”:“libcouchbase/2.9.0”,“version”:1}
Are these response correct, or am I missing something ?
Thanks,
Jatin