Quorum status

Request Structure:

http://<cluster>:<port>/api/quorum/status

Post data:

access_token = <access_token>

The response from the server:

{
 "msg": {
   "status": "OK",
   "error": "",
   "master": "node-2.docluster.com",
   "nodes": [
    {
     "node": "node-2.docluster.com",
     "status": "online",
     "error": "",
     "config_version": 8
    },
    {
     "node": "node-3.docluster.com",
     "status": "online",
     "error": "",
     "config_version": 8
    },
    {
     "node": "node-4.docluster.com",
     "status": "online",
     "error": "",
     "config_version": 8
    }
   ]
 },
 "status": "success",
 "error": ""
}

Errors:

-<X> MNG nodes are not online

Example:

import requests
import json

api_url = "http://<IP>:<PORT>/api/"
access_token = 'BLABLALBA'

path = 'quorum/status'
data = {}

def send(path, data):
    data['access_token'] = access_token
    send = requests.post(url=api_url + path, data=data)
    print(send.text)
    
send(path, data)

 


Revision #2
Created 1 May 2022 15:24:15 by Ruslan
Updated 6 May 2022 12:59:24 by Ruslan