Hitachi

JP1 Version 11 JP1/Operations Analytics REST APIリファレンス


2.5.3 システムプロファイルの作成

システムプロファイルを新規に作成します。

権限

Admin, Modify

APIのバージョン

v1

リクエスト形式

POST http[s]://host:port/Analytics/version/objects/SystemThresholdProfiles

リクエストボディー

リクエストボディーの構造とオブジェクトの属性を次に示します。

SystemThresholdProfile

{
        "profileName":"...",
        "description":"...",
        "resourceType":"...",
        "profileType":"...",
        "thresholdValues":[{
            "monitoring":"...",
            "metricType":"...",
            "displayName":"...",
            "unit":"...",
            "proportion":"...",
            "thresholdValueOfWarning":"...",
            "thresholdValueOfError":"...",
            "stepSize":"...",
            "max":"...",
            "min":"..."
        },
        :
        ]
}

SystemThresholdProfile (Type: SystemThresholdProfile)

属性

データ型

説明

profileName

string

システムプロファイルの名称。128文字以下の文字列を指定します。

description

string

システムプロファイルの説明。256文字以下の文字列を指定します。

resourceType

string

システムプロファイルが適用できるリソース種別。

・ESX:ESXサーバ

・HYPERV:Hyper-Vサーバ

・IPSWITCH:IPスイッチ

・FCSWITCH:FCスイッチ

profileType

string

システムプロファイルの変更種別

・User:ユーザーが作成したプロファイル

・Default:デフォルトで登録されているプロファイル

・Preset:初期値が設定されたプロファイル

thresholdValues

SystemThresholdValue[]

システムプロファイルに設定されているしきい値の内容。

thresholdValues (Type: SystemThresholdValue)

属性

データ型

説明

monitoring

boolean

監視しているしきい値かどうか。

・true:監視している。

・false:監視していない。

省略時はfalseが設定されます。

metricType

string

しきい値の識別子。未サポートのメンバーです。

displayName

string

しきい値の表示名。

unit

string

しきい値の単位を表す文字列。

proportion

boolean

しきい値の方向。

・true:測定値がしきい値を下回る場合に異常または警告となる。

・false:測定値がしきい値を上回る場合に異常または警告になる。

thresholdValueOfWarning

float

警告を表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

thresholdValueOfError

float

エラーを表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

stepSize

float

しきい値の増加量。

max

double

しきい値がとりえる最大値。

min

double

しきい値がとりえる最小値。

レスポンスボディー

レスポンスボディーの構造とオブジェクトの属性を次に示します。

SystemThresholdProfile

{
        "instanceID":"...",
        "profileName":"...",
        "description":"...",
        "resourceType":"...",
        "profileType":"...",
        "thresholdValues":[{
            "instanceID":"...",
            "monitoring":"...",
            "metricType":"...",
            "displayName":"...",
            "unit":"...",
            "proportion":"...",
            "thresholdValueOfWarning":"...",
            "thresholdValueOfError":"...",
            "stepSize":"...",
            "max":"...",
            "min":"..."
        },
        :
        ],
        "numOfResources":"..."
}

SystemThresholdProfile (Type: SystemThresholdProfile)

属性

データ型

説明

instanceID

long

インスタンスを特定するID

profileName

string

システムプロファイルの名称。128文字以下の文字列を指定します。

description

string

システムプロファイルの説明。256文字以下の文字列を指定します。

resourceType

string

システムプロファイルが適用できるリソース種別。

・ESX:ESXサーバ

・HYPERV:Hyper-Vサーバ

・IPSWITCH:IPスイッチ

・FCSWITCH:FCスイッチ

profileType

string

システムプロファイルの変更種別

・User:ユーザーが作成したプロファイル

・Default:デフォルトで登録されているプロファイル

・Preset:初期値が設定されたプロファイル

thresholdValues

SystemThresholdValue[]

システムプロファイルに設定されているしきい値の内容。

numOfResources

int

システムプロファイルが割り当たっているリソースの数

thresholdValues (Type: SystemThresholdValue)

属性

データ型

説明

instanceID

long

インスタンスを特定するID

monitoring

boolean

監視しているしきい値かどうか。

・true:監視している。

・false:監視していない。

省略時はfalseが設定されます。

metricType

string

しきい値の識別子。未サポートのメンバーです。

displayName

string

しきい値の表示名。

unit

string

しきい値の単位を表す文字列。

proportion

boolean

しきい値の方向。

・true:測定値がしきい値を下回る場合に異常または警告となる。

・false:測定値がしきい値を上回る場合に異常または警告になる。

thresholdValueOfWarning

float

警告を表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

thresholdValueOfError

float

エラーを表すしきい値。しきい値は以下の条件に合わせて指定する必要があります。

・stepSizeの倍数

・max以下

・min以上

stepSize

float

しきい値の増加量。

max

double

しきい値がとりえる最大値。

min

double

しきい値がとりえる最小値。

ステータスコード

HTTPステータスコード

Reason phrase

説明

201

Created

正常終了

400

Bad Request

リクエストボディ形式不正

401

Unauthorized

ログイン権限がない

403

Forbidden

更新権限がない

404

Not Found

リソースが存在しない

409

Conflict

nameが一致するリソースが存在する

412

Precondition Failed

サーバーが起動していない

500

Internal Server Error

サーバーサイドエラー

使用例

[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
}