azure-templatesnats

Check cluster status

To check NATS cluster status you only need to run the following command. You will see all the active nodes in the cluster (the num_routes parameter) and their IP addresses:

$ curl http://127.0.0.1:8222/routez
{
    "server_id": "BZl8sCmkxNxOrNYF21jWtl",
    "now": "2018-07-24T17:04:52.745360845Z",
    "num_routes": 2,
    "routes": [
        {
        "rid": 8,
        "remote_id": "aFOdEP8akeUP4IVF7C417y",
        "did_solicit": false,
        "is_configured": false,
        "ip": "10.0.0.4",
        "port": 50048,
        "pending_size": 0,
        "in_msgs": 0,
        "out_msgs": 0,
        "in_bytes": 0,
        "out_bytes": 0,
        "subscriptions": 0
        },
        {
        "rid": 4,
        "remote_id": "KMqrAbBO4QCxdXxgREvPz5",
        "did_solicit": false,
        "is_configured": false,
        "ip": "10.0.0.5",
        "port": 48748,
        "pending_size": 0,
        "in_msgs": 2,
        "out_msgs": 0,
        "in_bytes": 18,
        "out_bytes": 0,
        "subscriptions": 0
        }
    ]
}
Last modification September 5, 2018