Cluster Status

frantek

Renowned Member
May 30, 2009
170
7
83
Hi,

as the "current" check_mk plugin for PVE clusters relies on "pvecm" output of PVE v2 (!) I want to do a rewrite of the plugin. I think "pvesh get /cluster/ha/status/current" and "pvesh get /cluster/ha/status/manager_status" may be a good starting point. I found no detailed documentation about the output and the possible states.

What I get is:

Code:
root@pve02:~# pvesh get /cluster/ha/status/current
200 OK
[
   {
      "id" : "quorum",
      "node" : "pve02",
      "quorate" : 1,
      "status" : "OK",
      "type" : "quorum"
   },
   {
      "id" : "master",
      "node" : "pve02",
      "status" : "pve02 (active, Sun Oct  8 14:49:28 2017)",
      "timestamp" : 1507466968,
      "type" : "master"
   },
   {
      "id" : "lrm:pve01",
      "node" : "pve01",
      "status" : "pve01 (active, Sun Oct  8 14:49:24 2017)",
      "timestamp" : 1507466964,
      "type" : "lrm"
   },
   {
      "id" : "lrm:pve02",
      "node" : "pve02",
      "status" : "pve02 (idle, Sun Oct  8 14:49:34 2017)",
      "timestamp" : 1507466974,
      "type" : "lrm"
   },
   {
      "id" : "lrm:pve03",
      "node" : "pve03",
      "status" : "pve03 (idle, Sun Oct  8 14:49:34 2017)",
      "timestamp" : 1507466974,
      "type" : "lrm"
   },
   {
      "crm_state" : "started",
      "group" : "MHC",
      "id" : "service:vm:999",
      "max_relocate" : 1,
      "max_restart" : 1,
      "node" : "pve01",
      "request_state" : "started",
      "sid" : "vm:999",
      "state" : "started",
      "status" : "vm:999 (pve01, started)",
      "type" : "service"
   }
]

and

Code:
root@pve02:~# pvesh get /cluster/ha/status/manager_status
200 OK
{
   "lrm_status" : {
      "pve01" : {
         "mode" : "active",
         "results" : {
            "PxeLrpo7Xb6giaawAoSeRA" : {
               "exit_code" : 0,
               "sid" : "vm:999",
               "state" : "started"
            }
         },
         "state" : "active",
         "timestamp" : 1507467434
      },
      "pve02" : {
         "mode" : "active",
         "results" : {},
         "state" : "wait_for_agent_lock",
         "timestamp" : 1507467439
      },
      "pve03" : {
         "mode" : "active",
         "results" : {},
         "state" : "wait_for_agent_lock",
         "timestamp" : 1507467439
      }
   },
   "manager_status" : {
      "master_node" : "pve02",
      "node_status" : {
         "pve01" : "online",
         "pve02" : "online",
         "pve03" : "online"
      },
      "service_status" : {
         "vm:999" : {
            "node" : "pve01",
            "running" : 1,
            "state" : "started",
            "uid" : "YYfZMlGCrAkP8dU2KHUVmg"
         }
      },
      "timestamp" : 1507467438
   },
   "quorum" : {
      "node" : "pve02",
      "quorate" : "1"
   }
}

I need detailed information about every tag. Can some one please help?

TIA
Matthias
 
the PVE Admin Guide's HA chapter should explain most/all of the fields you see in the API response. if you still have questions after reading it, feel free to ask concrete questions :)
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!