You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
2.6 KiB
90 lines
2.6 KiB
package resmon
|
|
|
|
// GetByComputeData represents an array of data points
|
|
type GetByComputeData []GetByComputePoint
|
|
|
|
type GetByComputePoint struct {
|
|
ID uint64 `json:"id"`
|
|
Name string `json:"name"`
|
|
ComputeID uint64 `json:"computeId"`
|
|
AccountID uint64 `json:"accountId"`
|
|
RGID uint64 `json:"rgId"`
|
|
Usage ComputeUsage `json:"usage"`
|
|
Disks []ItemDisk `json:"disks"`
|
|
UID string `json:"uid"`
|
|
StackID uint64 `json:"stackId"`
|
|
}
|
|
|
|
type ComputeUsage struct {
|
|
VCPUsConsumed uint64 `json:"vcpusConsumed"`
|
|
Storage uint64 `json:"storage"`
|
|
CPUTime uint64 `json:"cpuTime"`
|
|
ExtIPs uint64 `json:"extips"`
|
|
RAMConsumed uint64 `json:"ramConsumed"`
|
|
VCPUsReserved uint64 `json:"vcpusReserved"`
|
|
IsUp uint64 `json:"isUp"`
|
|
RAMConsumedReal uint64 `json:"ramConsumedReal"`
|
|
RAMReserved uint64 `json:"ramReserved"`
|
|
}
|
|
|
|
type ItemDisk struct {
|
|
Pool string `json:"pool"`
|
|
ResID string `json:"resId"`
|
|
SizeUsed uint64 `json:"sizeUsed"`
|
|
SizeMax uint64 `json:"sizeMax"`
|
|
}
|
|
|
|
// GetByGRIDData represents an array of data points
|
|
type GetByGRIDData []GetByGRIDPoint
|
|
|
|
type GetByGRIDPoint struct {
|
|
UID string `json:"uid"`
|
|
Total ItemTotalByGRID `json:"total"`
|
|
Storages map[string]ItemStorage `json:"storages"`
|
|
}
|
|
|
|
type ItemTotalByGRID struct {
|
|
StacksCPU uint64 `json:"stacksCPU"`
|
|
StorageCapacity uint64 `json:"storageCapacity"`
|
|
CPUPower uint64 `json:"cpuPower"`
|
|
CPUUtil uint64 `json:"cpuUtil"`
|
|
TotalMem uint64 `json:"totalMem"`
|
|
ReservedMem uint64 `json:"reservedMem"`
|
|
UsedMem uint64 `json:"usedMem"`
|
|
FreeMem uint64 `json:"freeMem"`
|
|
VCPUConsumed uint64 `json:"vcpuConsumed"`
|
|
}
|
|
|
|
type ItemStorage struct {
|
|
CapacityLimit uint64 `json:"capacityLimit"`
|
|
Consumed uint64 `json:"consumed"`
|
|
Type string `json:"type"`
|
|
UID string `json:"uid"`
|
|
}
|
|
|
|
// GetByStackData represents an array of data points
|
|
type GetByStackData []GetByStackPoint
|
|
|
|
type GetByStackPoint struct {
|
|
Usage StackUsage `json:"usage"`
|
|
CPUInfo CPUinfoByStack `json:"cpuInfo"`
|
|
Name string `json:"name"`
|
|
ID uint64 `json:"id"`
|
|
}
|
|
|
|
type StackUsage struct {
|
|
CPUPower uint64 `json:"cpuPower"`
|
|
UsedVCPUs uint64 `json:"usedVcpus"`
|
|
PCPU uint64 `json:"pcpu"`
|
|
UsedMem uint64 `json:"usedMem"`
|
|
CPUUtil uint64 `json:"cpuUtil"`
|
|
ReservedMem uint64 `json:"reservedMem"`
|
|
FreeMem uint64 `json:"freeMem"`
|
|
}
|
|
|
|
type CPUinfoByStack struct {
|
|
ClockSpeed uint64 `json:"clockSpeed"`
|
|
CoreCount uint64 `json:"coreCount"`
|
|
PhysCount uint64 `json:"physCount"`
|
|
}
|