2.5.3 Creating System Profile
This API creates a system profile.
Execution permission
Admin, Modify
API version
v1
Request format
POST http[s]://host:port/Analytics/version/objects/SystemThresholdProfiles
Request body
The structure of the request body and the object attributes are as follows:SystemThresholdProfile
{ "profileName":"...", "description":"...", "resourceType":"...", "profileType":"...", "thresholdValues":[{ "monitoring":"...", "metricType":"...", "displayName":"...", "unit":"...", "proportion":"...", "thresholdValueOfWarning":"...", "thresholdValueOfError":"...", "stepSize":"...", "max":"...", "min":"..." }, : ] }
SystemThresholdProfile (Type: SystemThresholdProfile)
Attribute |
Type |
Description |
---|---|---|
profileName |
string |
System profile name. Use 128 or fewer characters. |
description |
string |
Description of the system profile. Use 256 or fewer characters. |
resourceType |
string |
Resource type to which the system profile can be applied. ・ESX: ESX server ・HYPERV: Hyper-V server ・IPSWITCH: IP Switch ・FCSWITCH: FC Switch |
profileType |
string |
Change type of the system profile. ・User: Profile is created by a user ・Default: Profile is registered by default ・Preset: Profile for which the initial settings are set |
thresholdValues |
SystemThresholdValue[] |
Details of the threshold set in the system profile. |
thresholdValues (Type: SystemThresholdValue)
Attribute |
Type |
Description |
---|---|---|
monitoring |
boolean |
Whether the threshold is monitored. ・true: Threshold is monitored ・false: Threshold is not monitored If this member is omitted, false is set. |
metricType |
string |
Identifier of the threshold. This member is not supported. |
displayName |
string |
Display name of the threshold. |
unit |
string |
String indicating the unit of the threshold. |
proportion |
boolean |
Direction of the threshold. ・true: When the measured value falls below the threshold, an error or warning occurs. ・false: When the measured value exceeds the threshold, an error or warning occurs. |
thresholdValueOfWarning |
float |
Threshold for displaying warnings. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min |
thresholdValueOfError |
float |
Threshold for displaying errors. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min |
stepSize |
float |
Increment for the threshold |
max |
double |
Maximum value that can be specified for the threshold |
min |
double |
Minimum value that can be specified for the threshold |
Response body
The structure of the response body and the object attributes are as follows:SystemThresholdProfile
{ "instanceID":"...", "profileName":"...", "description":"...", "resourceType":"...", "profileType":"...", "thresholdValues":[{ "instanceID":"...", "monitoring":"...", "metricType":"...", "displayName":"...", "unit":"...", "proportion":"...", "thresholdValueOfWarning":"...", "thresholdValueOfError":"...", "stepSize":"...", "max":"...", "min":"..." }, : ], "numOfResources":"..." }
SystemThresholdProfile (Type: SystemThresholdProfile)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID for identifying instances |
profileName |
string |
System profile name. Use 128 or fewer characters. |
description |
string |
Description of the system profile. Use 256 or fewer characters. |
resourceType |
string |
Resource type to which the system profile can be applied. ・ESX: ESX server ・HYPERV: Hyper-V server ・IPSWITCH: IP Switch ・FCSWITCH: FC Switch |
profileType |
string |
Change type of the system profile. ・User: Profile is created by a user ・Default: Profile is registered by default ・Preset: Profile for which the initial settings are set |
thresholdValues |
SystemThresholdValue[] |
Details of the threshold set in the system profile. |
numOfResources |
int |
Number of resources to which the system profile is assigned |
thresholdValues (Type: SystemThresholdValue)
Attribute |
Type |
Description |
---|---|---|
instanceID |
long |
ID for identifying instances |
monitoring |
boolean |
Whether the threshold is monitored. ・true: Threshold is monitored ・false: Threshold is not monitored If this member is omitted, false is set. |
metricType |
string |
Identifier of the threshold. This member is not supported. |
displayName |
string |
Display name of the threshold. |
unit |
string |
String indicating the unit of the threshold. |
proportion |
boolean |
Direction of the threshold. ・true: When the measured value falls below the threshold, an error or warning occurs. ・false: When the measured value exceeds the threshold, an error or warning occurs. |
thresholdValueOfWarning |
float |
Threshold for displaying warnings. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min |
thresholdValueOfError |
float |
Threshold for displaying errors. You need to specify this threshold according to the following conditions: ・Multiple of stepSize ・Less than or equal to max ・Greater than or equal to min |
stepSize |
float |
Increment for the threshold |
max |
double |
Maximum value that can be specified for the threshold |
min |
double |
Minimum value that can be specified for the threshold |
Status codes
Status code |
Reason phrase |
Description |
---|---|---|
201 |
Created |
Success. |
400 |
Bad Request |
A format of request body is invalid. |
401 |
Unauthorized |
No login privilege. |
403 |
Forbidden |
No update privilege. |
404 |
Not Found |
The resource was not found. |
409 |
Conflict |
A resource with the same name exists. |
412 |
Precondition Failed |
The server is not available. |
500 |
Internal Server Error |
Server processing error. |
Example code
[Request Header] POST /Analytics/v1/objects/SystemThresholdProfiles HTTP/1.1 Authorization: Basic c3lzdGVtOm1hbmFnZXI= User-Agent: curl/7.33.0 Host: localhost:22015 Accept: application/json Content-Type: application/json Accept-Language: ja Content-Length: 6861 Expect: 100-continue [Request Body] { "instanceID" : 23, "profileName" : "Default Profile for Hyper-V", "description" : "Default Profile for Hyper-V", "resourceType" : "HYPERV", "profileType" : "User", "thresholdValues" : [ { "instanceID" : 539, "monitoring" : true, "metricType" : "WIN_CPU_LOAD", "displayName" : "CPU Use", "unit" : "%", "proportion" : false, "thresholdValueOfWarning" : 80.0, "thresholdValueOfError" : 90.0, "stepSize" : 1.0, "max" : 100.0, "min" : 0.0 211 }, { ...... }, ...... ], "numOfResources" : 1 } [Response Header] HTTP/1.1 100 Continue HTTP/1.1 201 Created Date: Fri, 27 Nov 2015 07:59:59 GMT Server: Cosminexus HTTP Server Cache-Control: no-cache WWW-Authenticate: HSSO 2dfd66512c3fb3d859df167fc452989dd389797_WVlGcHsLfg5ffg0I_V0810 Location: http://localhost:22015/Analytics/v1/objects/SystemThresholdProfiles/64 X-Frame-Options: SAMEORIGIN Transfer-Encoding: chunked Content-Type: application/json [Response Body] { "instanceID" : 64, "profileName" : "Default Profile for Hyper-V", "description" : "Default Profile for Hyper-V", "resourceType" : "HYPERV", "profileType" : "User", "thresholdValues" : [ { "instanceID" : 807, "monitoring" : true, "metricType" : "WIN_CPU_LOAD", "displayName" : "CPU Use", "unit" : "%", "proportion" : false, "thresholdValueOfWarning" : 80.0, "thresholdValueOfError" : 90.0, "stepSize" : 1.0, "max" : 100.0, "min" : 0.0 }, { ...... }, ...... ], "numOfResources" : 0 }