Add statistics values to the API
This commit is contained in:
parent
deaf138e45
commit
4cdf1f7247
|
@ -803,12 +803,57 @@ class API_VM_Root(Resource):
|
||||||
memory:
|
memory:
|
||||||
type: integer
|
type: integer
|
||||||
description: The assigned RAM of the VM in MB
|
description: The assigned RAM of the VM in MB
|
||||||
|
memory_stats:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
actual:
|
||||||
|
type: integer
|
||||||
|
description: The total active memory of the VM in kB
|
||||||
|
swap_in:
|
||||||
|
type: integer
|
||||||
|
description: The amount of swapped in data in kB
|
||||||
|
swap_out:
|
||||||
|
type: integer
|
||||||
|
description: The amount of swapped out data in kB
|
||||||
|
major_fault:
|
||||||
|
type: integer
|
||||||
|
description: The number of major page faults
|
||||||
|
minor_fault:
|
||||||
|
type: integer
|
||||||
|
description: The number of minor page faults
|
||||||
|
unused:
|
||||||
|
type: integer
|
||||||
|
description: The amount of memory left completely unused by the system in kB
|
||||||
|
available:
|
||||||
|
type: integer
|
||||||
|
description: The total amount of usable memory as seen by the domain in kB
|
||||||
|
usable:
|
||||||
|
type: integer
|
||||||
|
description: How much the balloon can be inflated without pushing the guest system to swap in kB
|
||||||
|
last_update:
|
||||||
|
type: integer
|
||||||
|
description: Timestamp of the last update of statistics, in seconds
|
||||||
|
rss:
|
||||||
|
type: integer
|
||||||
|
description: The Resident Set Size of the process running the domain in kB
|
||||||
vcpu:
|
vcpu:
|
||||||
type: integer
|
type: integer
|
||||||
description: The assigned vCPUs of the VM
|
description: The assigned vCPUs of the VM
|
||||||
vcpu_topology:
|
vcpu_topology:
|
||||||
type: string
|
type: string
|
||||||
description: The topology of the assigned vCPUs in Sockets/Cores/Threads format
|
description: The topology of the assigned vCPUs in Sockets/Cores/Threads format
|
||||||
|
vcpu_stats:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
cpu_time:
|
||||||
|
type: integer
|
||||||
|
description: The active CPU time for all vCPUs
|
||||||
|
user_time:
|
||||||
|
type: integer
|
||||||
|
description: vCPU user time
|
||||||
|
system_time:
|
||||||
|
type: integer
|
||||||
|
description: vCPU system time
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
description: The type of the VM
|
description: The type of the VM
|
||||||
|
@ -847,6 +892,30 @@ class API_VM_Root(Resource):
|
||||||
model:
|
model:
|
||||||
type: string
|
type: string
|
||||||
description: The virtual network device model
|
description: The virtual network device model
|
||||||
|
rd_bytes:
|
||||||
|
type: integer
|
||||||
|
description: The number of read bytes on the interface
|
||||||
|
rd_packets:
|
||||||
|
type: integer
|
||||||
|
description: The number of read packets on the interface
|
||||||
|
rd_errors:
|
||||||
|
type: integer
|
||||||
|
description: The number of read errors on the interface
|
||||||
|
rd_drops:
|
||||||
|
type: integer
|
||||||
|
description: The number of read drops on the interface
|
||||||
|
wr_bytes:
|
||||||
|
type: integer
|
||||||
|
description: The number of write bytes on the interface
|
||||||
|
wr_packets:
|
||||||
|
type: integer
|
||||||
|
description: The number of write packets on the interface
|
||||||
|
wr_errors:
|
||||||
|
type: integer
|
||||||
|
description: The number of write errors on the interface
|
||||||
|
wr_drops:
|
||||||
|
type: integer
|
||||||
|
description: The number of write drops on the interface
|
||||||
disks:
|
disks:
|
||||||
type: array
|
type: array
|
||||||
description: The PVC storage volumes attached to the VM
|
description: The PVC storage volumes attached to the VM
|
||||||
|
@ -865,6 +934,18 @@ class API_VM_Root(Resource):
|
||||||
bus:
|
bus:
|
||||||
type: string
|
type: string
|
||||||
description: The virtual bus of the volume in the VM
|
description: The virtual bus of the volume in the VM
|
||||||
|
rd_req:
|
||||||
|
type: integer
|
||||||
|
description: The number of read requests from the volume
|
||||||
|
rd_bytes:
|
||||||
|
type: integer
|
||||||
|
description: The number of read bytes from the volume
|
||||||
|
wr_req:
|
||||||
|
type: integer
|
||||||
|
description: The number of write requests to the volume
|
||||||
|
wr_bytes:
|
||||||
|
type: integer
|
||||||
|
description: The number of write bytes to the volume
|
||||||
controllers:
|
controllers:
|
||||||
type: array
|
type: array
|
||||||
description: The device controllers attached to the VM
|
description: The device controllers attached to the VM
|
||||||
|
|
|
@ -908,9 +908,25 @@
|
||||||
"description": "The full name of the volume in \"pool/volume\" format",
|
"description": "The full name of the volume in \"pool/volume\" format",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"rd_bytes": {
|
||||||
|
"description": "The number of read bytes from the volume",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"rd_req": {
|
||||||
|
"description": "The number of read requests from the volume",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
"type": {
|
"type": {
|
||||||
"description": "The type of volume",
|
"description": "The type of volume",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"wr_bytes": {
|
||||||
|
"description": "The number of write bytes to the volume",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"wr_req": {
|
||||||
|
"description": "The number of write requests to the volume",
|
||||||
|
"type": "integer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
@ -944,6 +960,51 @@
|
||||||
"description": "The assigned RAM of the VM in MB",
|
"description": "The assigned RAM of the VM in MB",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"memory_stats": {
|
||||||
|
"properties": {
|
||||||
|
"actual": {
|
||||||
|
"description": "The total active memory of the VM in kB",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"available": {
|
||||||
|
"description": "The total amount of usable memory as seen by the domain in kB",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"last_update": {
|
||||||
|
"description": "Timestamp of the last update of statistics, in seconds",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"major_fault": {
|
||||||
|
"description": "The number of major page faults",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"minor_fault": {
|
||||||
|
"description": "The number of minor page faults",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"rss": {
|
||||||
|
"description": "The Resident Set Size of the process running the domain in kB",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"swap_in": {
|
||||||
|
"description": "The amount of swapped in data in kB",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"swap_out": {
|
||||||
|
"description": "The amount of swapped out data in kB",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"unused": {
|
||||||
|
"description": "The amount of memory left completely unused by the system in kB",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"usable": {
|
||||||
|
"description": "How much the balloon can be inflated without pushing the guest system to swap in kB",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"migrated": {
|
"migrated": {
|
||||||
"description": "Whether the VM has been migrated, either \"no\" or \"from <last_node>\"",
|
"description": "Whether the VM has been migrated, either \"no\" or \"from <last_node>\"",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
@ -964,6 +1025,22 @@
|
||||||
"description": "The virtual network device model",
|
"description": "The virtual network device model",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"rd_bytes": {
|
||||||
|
"description": "The number of read bytes on the interface",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"rd_drops": {
|
||||||
|
"description": "The number of read drops on the interface",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"rd_errors": {
|
||||||
|
"description": "The number of read errors on the interface",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"rd_packets": {
|
||||||
|
"description": "The number of read packets on the interface",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
"source": {
|
"source": {
|
||||||
"description": "The parent network bridge on the node",
|
"description": "The parent network bridge on the node",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
@ -971,6 +1048,22 @@
|
||||||
"type": {
|
"type": {
|
||||||
"description": "The PVC network type",
|
"description": "The PVC network type",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
},
|
||||||
|
"wr_bytes": {
|
||||||
|
"description": "The number of write bytes on the interface",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"wr_drops": {
|
||||||
|
"description": "The number of write drops on the interface",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"wr_errors": {
|
||||||
|
"description": "The number of write errors on the interface",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"wr_packets": {
|
||||||
|
"description": "The number of write packets on the interface",
|
||||||
|
"type": "integer"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
|
@ -1016,6 +1109,23 @@
|
||||||
"description": "The assigned vCPUs of the VM",
|
"description": "The assigned vCPUs of the VM",
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
},
|
},
|
||||||
|
"vcpu_stats": {
|
||||||
|
"properties": {
|
||||||
|
"cpu_time": {
|
||||||
|
"description": "The active CPU time for all vCPUs",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"system_time": {
|
||||||
|
"description": "vCPU system time",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"user_time": {
|
||||||
|
"description": "vCPU user time",
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"vcpu_topology": {
|
"vcpu_topology": {
|
||||||
"description": "The topology of the assigned vCPUs in Sockets/Cores/Threads format",
|
"description": "The topology of the assigned vCPUs in Sockets/Cores/Threads format",
|
||||||
"type": "string"
|
"type": "string"
|
||||||
|
@ -5497,6 +5607,12 @@
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"name": "wait",
|
"name": "wait",
|
||||||
"type": "boolean"
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"description": "Whether to enforce live migration and disable shutdown-based fallback migration",
|
||||||
|
"in": "query",
|
||||||
|
"name": "force_live",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responses": {
|
"responses": {
|
||||||
|
|
Loading…
Reference in New Issue