Hi there,
Is there a way to monitor an LXC's mount point metrics (disk IO, size, usage) via the API? From our testing, all that is made available is the rootfs.
Is possible to append this data (when applicable) to the follow calls? ...unless someone has a solution already
Desired Additional LXC Metrics:
_____________________________________________________________
API Option 1: /api2/json/cluster/resources
_____________________________________________________________
API Option 2: /api2/json/nodes/{{node-id}}/lxc/{{container-id}}/status/current
Is there a way to monitor an LXC's mount point metrics (disk IO, size, usage) via the API? From our testing, all that is made available is the rootfs.
Is possible to append this data (when applicable) to the follow calls? ...unless someone has a solution already
Desired Additional LXC Metrics:
{
{{normal output}}
"mp[0-255]": {
"diskread": {{mount-point-diskread}},
"diskwrite": {{mount-point-diskwrite}},
"disk": {{mount-point-disk-usage}},
"maxdisk": {{mount-point-maxdisk}}
},
},
_____________________________________________________________
API Option 1: /api2/json/cluster/resources
{
"node": "{{node-id}}",
"maxcpu": 2,
"disk": 715259904,
"status": "running",
"vmid": {{container-id}},
"uptime": 16952,
"id": "lxc/{{container-id}}",
"diskread": 0,
"diskwrite": 0,
"name": "{{container-name}}",
"netout": 1578700325,
"cpu": 0.0395441522727254,
"template": 0,
"mem": 368377856,
"netin": 29339461622,
"maxmem": 8589934592,
"type": "lxc",
"maxdisk": 17179869184
},
_____________________________________________________________
API Option 2: /api2/json/nodes/{{node-id}}/lxc/{{container-id}}/status/current
{
"data": {
"netout": 1535700797,
"status": "running",
"disk": 714997760,
"diskread": 0, !! <-- rootfs disk read
"swap": 0,
"name": "{{container-name}}",
"cpu": 0.0370043910295161,
"uptime": 16192,
"netin": 27769327908,
"pid": 1809491,
"vmid": {{container-id}},
"cpus": 2,
"maxdisk": 17179869184,
"type": "lxc",
"maxmem": 8589934592,
"maxswap": 1073741824,
"mem": 368381952,
"ha": {
"managed": 0
},
"diskwrite": 0 !! <-- rootfs disk write
}
}
Last edited: