You can set dynamic thresholds by specifying a user profile and resources.
Execution permission
Admin, Modify
Request line
POST baseURL/v1/objects/ThresholdProfiles/{id}/actions/updateDynamicThreshold/invoke
Request body
The structure of the request body and the object attributes are as follows:Action
{ "name":"...", "href":"...", "method":"...", "type":"...", "parameters":["...", ...] }
Action (Type: Action)
Attribute |
Type |
Description |
---|---|---|
name |
string |
Name of the action. |
href |
string |
URL for the action. |
method |
string |
Name of the method. |
type |
string |
Data format for the object. |
parameters |
anyType[] |
A list of ResourceThresholdFixedParam objects necessary to execute an operation. For details, see the table below. |
ResourceThresholdFixedParam
{ "metricType":"...", "resourceID":"...", "resourceType":"...", "planID":"...", "fixed":"...", "value":"..." }
ResourceThresholdFixedParam (Type: ResourceThresholdFixedParam)
Attribute |
Type |
Description |
---|---|---|
metricType |
enum |
Type of the metric (For details about the valid values, see the table MetricType in List of enumerators.) |
resourceID |
string |
ID of the resource |
resourceType |
enum |
Type of the resource (For details about the valid values, see the table PerformanceResourceType in List of enumerators.) |
planID |
string |
ID of the plan |
fixed |
boolean |
Whether or not to recalculate the thresholds periodically. If the thresholds are recalculated periodically, "true" is set. If the thresholds are not recalculated periodically, "false" is set. This item is specified if the thresholds are to be manipulated for each component. |
value |
float |
Value of threshold to be set |
Response body
The structure of the response body and the object attributes is as follows:Job
{ "instanceID":"...", "created":"...", "updated":"...", "completed":"...", "state":"...", "affectedResource":["...", ...], "result":["...", ...] }
Job (Type: Job)
Attribute |
Type |
Description |
---|---|---|
instanceID |
string |
ID of the Instance. |
created |
string |
Date the object is generated in "yyyy-mm-ddThh:mm:ss.mmmTZD" format (e.g., 2017-08-25T20:07:39.472+09:00). |
updated |
string |
Time the object is updated in "yyyy-mm-ddThh:mm:ss.mmmTZD" format (e.g., 2017-08-25T20:07:39.472+09:00). |
completed |
string |
Time the processing completed in "yyyy-mm-ddThh:mm:ss.mmmTZD" format (e.g., 2017-08-25T20:07:39.472+09:00). |
state |
string |
One of the following values is set: "failed": The operation failed. "success": The operation completed successfully. |
affectedResource |
string[] |
A blank space is set. |
result |
anyType[] |
A list of objects. No value is set. |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
200 |
OK |
Success. |
400 |
Bad Request |
The format of the request body is invalid. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No update privilege. |
404 |
Not Found |
The resource was not found. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
503 |
Service Unavailable |
Analyzer detail view server communication error. |
Example code
[Request Header] POST /Analytics/v1/objects/ThresholdProfiles/thProfile%236e5c28ee-0b19-46da-a48b-6b340dc0e329/actions/updateDynamicThreshold/invoke Authorization: Basic c3lzdGVtOm1hbmFnZXI= Host: localhost:22015 Accept: application/json Content-Type: application/json [Request Body] { "name": "updateDynamicThreshold", "href": "http://localhost:22015/Analytics/v1/objects/ThresholdProfiles/thProfile%236e5c28ee%2d0b19%2d46da%2da48b52d6b340dc0e329/actions/updateDynamicThreshold/invoke", "method": "POST", "type": "application/json", "parameters": [ { "metricType": "ESX_VM_VM_CPUREADY", "resourceID": "vm#ITPDLab_172.17.17.115_vm-247", "resourceType": "ESX_VM", "planID": "thPlan#6ffc32af-b18d-4afe-bc65-449ceda5c443", "fixed": false, "value": 90.0 } ] } [Response Header] HTTP/1.1 200 OK Date: Mon, 22 Aug 2016 04:30:33 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO a27ec87fb489127695fb5c88fcbe68e697ff3e87_Y2UOI2pkMXQ=_V0810 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "instanceID": "23e9ef9a-045c-4593-bb24-2ba9a0f9e545", "created": "2016-08-22T13:30:34.925+09:00", "updated": "2016-08-22T13:30:37.490+09:00", "completed": "2016-08-22T13:30:37.490+09:00", "state": "success", "affectedResource": [ ], "result": [ ] }