vcenter cluster edrs recommendation: generate
Gives a recommendation to scale in a cluster when all resources (CPU/memory/storage) are underutilized, or to scale out a cluster when any resource is being heavily utilized. NO_ACTION will be returned if cluster resources are well utilized. This operation was added in vSphere API 7.0.1.0.
Request:
HTTP request
POST https://{server}/rest/vcenter/cluster/{cluster}/edrs/recommendation?action=generate
Path Parameters
Name | Type | Description |
---|---|---|
Required | ||
cluster | string | Identifier of cluster that requests EDRS recommenation. |
Response:
HTTP Status Code: 200
Representation:
{
"value" : {
"hosts_to_remove" : [
"obj-103",
"obj-103"
],
"no_action_reasons" : [
{
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
},
{
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
],
"hosts" : [
"obj-103",
"obj-103"
],
"action" : "SCALE_OUT",
"is_edrs_enabled" : true,
"utilization" : {
"memory_scale_out_threshold" : 1,
"vsan_scale_out_threshold" : 1,
"vsan_scale_out_utilization" : 1,
"cpu_scale_out_utilization" : 1,
"vsan_scale_in_utilization" : 1,
"memory_scale_out_utilization" : 1,
"vsan_scale_in_threshold" : 1,
"cpu_scale_out_threshold" : 1,
"memory_scale_in_threshold" : 1,
"cpu_scale_in_threshold" : 1,
"vsan_utilization" : 1,
"cpu_scale_in_utilization" : 1,
"memory_scale_in_utilization" : 1
}
}
}
"value" : {
"hosts_to_remove" : [
"obj-103",
"obj-103"
],
"no_action_reasons" : [
{
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
},
{
"args" : [
"string",
"string"
],
"default_message" : "string",
"localized" : "string",
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"value" : {
"dt" : "2015-01-01T22:13:05.651Z",
"s" : "string",
"d" : 1.5,
"precision" : 1,
"format" : "SHORT_DATE",
"i" : 1,
"l" : {
"id" : "string",
"params" : [
{
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
},
"key" : "string"
}
]
}
],
"hosts" : [
"obj-103",
"obj-103"
],
"action" : "SCALE_OUT",
"is_edrs_enabled" : true,
"utilization" : {
"memory_scale_out_threshold" : 1,
"vsan_scale_out_threshold" : 1,
"vsan_scale_out_utilization" : 1,
"cpu_scale_out_utilization" : 1,
"vsan_scale_in_utilization" : 1,
"memory_scale_out_utilization" : 1,
"vsan_scale_in_threshold" : 1,
"cpu_scale_out_threshold" : 1,
"memory_scale_in_threshold" : 1,
"cpu_scale_in_threshold" : 1,
"vsan_utilization" : 1,
"cpu_scale_in_utilization" : 1,
"memory_scale_in_utilization" : 1
}
}
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | recommendation | an EDRS recommendation. |
value.is_edrs_enabled | boolean | This is true if the EDRS is enabled in the cluster. This attribute was added in vSphere API 7.0.1.0. |
value.action | string | Specifies the recommend action. This attribute was added in vSphere API 7.0.1.0. Defines the recommend action given by EDRS. This enumeration was added in vSphere API 7.0.1.0. Value is one of: SCALE_OUT: Recomend scale out - to add host into the cluster. This constant was added in vSphere API 7.0.1.0. SCALE_IN: Recommend scale in - to remove hosts from the cluster. This constant was added in vSphere API 7.0.1.0. NO_ACTION: No action is needed. It could because either cluster resources are well utilized, or scale in recommendation is supressed since no host can be evacuated. This constant was added in vSphere API 7.0.1.0. |
value.hosts_to_remove | string[] | Hosts that should be removed from the cluster for a SCALE_IN recommendation. This attribute was added in vSphere API 7.0.1.0. Optional. It is only relevant when action has value SCALE_IN. This field is optional and it is only relevant when the value of action is SCALE_IN.When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem . When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem . |
value.no_action_reasons | localizable_message[] | The reasons why NO_ACTION is recommended. The recommendation could be NO_ACTION because all resources are well utilized or because something is preventing recommending SCALE_IN even though resources utilization is low. This attribute was added in vSphere API 7.0.1.0. Optional. It is only relevant when action has value NO_ACTION. This field is optional and it is only relevant when the value of action is NO_ACTION. |
value.no_action_reasons[].id | string | Unique identifier of the localizable string or message template. This identifier is typically used to retrieve a locale-specific string or message template from a message catalog. |
value.no_action_reasons[].default_message | string | The value of this localizable string or message template in the en_US (English) locale. If vapi.std.localizable_message.id refers to a message template, the default message will contain the substituted arguments. This value can be used by clients that do not need to display strings and messages in the native language of the user. It could also be used as a fallback if a client is unable to access the appropriate message catalog. |
value.no_action_reasons[].args | string[] | Positional arguments to be substituted into the message template. This list will be empty if the message uses named arguments or has no arguments. |
value.hosts | string[] | A set of available hosts which were seen by EDRS when the recommendation was made. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this structure as a parameter, the field must contain identifiers for the resource type: HostSystem . When operations return a value of this structure as a result, the field will contain identifiers for the resource type: HostSystem . |
value.utilization | utilization_info | Contains the cluster resource utilization and corresponding threshold values that EDRS recommendation based on. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.cpu_scale_in_threshold | long | Threshold to determine whether CPU load is low. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.cpu_scale_in_utilization | long | Estimate of CPU low utilization. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.cpu_scale_out_threshold | long | Threshold to determine whether CPU load is high. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.cpu_scale_out_utilization | long | Estimate of CPU high utilization. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.memory_scale_in_threshold | long | Threshold to determine whether memory usage is low. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.memory_scale_in_utilization | long | Estimate of memory low utilization. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.memory_scale_out_threshold | long | Threshold to determine whether memory usage is high. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.memory_scale_out_utilization | long | Estimate of memory high utilization. This attribute was added in vSphere API 7.0.1.0. |
value.utilization.vsan_scale_in_threshold | long | Threshold to determine whether VSAN usage is low. This attribute was added in vSphere API 7.0.1.0. Optional. If VSAN is not availiable in cluster. |
value.utilization.vsan_scale_in_utilization | long | Estimate of VSAN low utilization. This attribute was added in vSphere API 7.0.1.0. Optional. If VSAN is not availiable in cluster. |
value.utilization.vsan_scale_out_threshold | long | Threshold to determine whether VSAN usage is high. This attribute was added in vSphere API 7.0.1.0. Optional. If VSAN is not availiable in cluster. |
value.utilization.vsan_scale_out_utilization | long | Estimate of VSAN high utilization. This attribute was added in vSphere API 7.0.1.0. Optional. If VSAN is not availiable in cluster. |
value.utilization.vsan_utilization | long | Actual VSAN utilization. This attribute was added in vSphere API 7.0.1.0. Optional. If VSAN is not availiable in cluster. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
404 | not_found | if the cluster is not known. |
403 | unauthorized | if the user doesn't have the required privileges. |