Alert template#

get_alert_template#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/api/v14/alert/template/ \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/api/v14/alert/template/, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/alert/template/,
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /alert/template/

アラートテンプレートを取得します。

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

承認トークン

応答例

[
  {
    "name": "string",
    "description": "string",
    "object_type": 0,
    "param_names": [
      "string"
    ],
    "param_types": "string",
    "params_units": [
      "string"
    ],
    "sql": "string",
    "applicable_on_server": "ALL",
    "default_check_frequency": 0,
    "default_history_retention": 0,
    "probe_dependency_list": [
      "string"
    ],
    "threshold_unit": "string",
    "is_system_template": false,
    "is_auto_create": true,
    "operator": ">",
    "low_threshold_value": 0,
    "medium_threshold_value": 0,
    "high_threshold_value": 0,
    "info_sql": "string"
  }
]

応答#

Status

Meaning

Description

Schema

200

コマンドラインからのサーバーインストーラーの呼び出し

成功した応答

Inline

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

anonymous

Query information ]

false

none

なし

» name

string

false

none

アラートテンプレートの名前。注 このプロパティは、POST要求の必須パラメーターです。

» description

string

false

none

アラートテンプレートの説明。注 このプロパティは、POST要求の必須パラメーターです。

» object_type

integer

false

none

このアラートテンプレートを適用するオブジェクトのタイプを定義します。 <ul><li>システム全体のアラートテンプレートは<b>50</b>です。</li><li>エージェントに適用されるアラートテンプレートは<b>100</b>です。</li> <li>管理対象サーバーに適用されるアラートテンプレートは<b>200</b>です。</li><li>特定の監視対象サーバーのデータベースに適用されるアラートテンプレートは<b>300</b>です。 </li><li>管理対象サーバーの特定のデータベースのスキーマに適用されるアラートテンプレートは<b>400</b>です。</li><li>特定のスキーマのテーブルに適用されるアラートテンプレート</li><li>監視対象サーバー上のデータベースの特定のスキーマのインデックスに適用されるアラートテンプレートは<b>600</b>です。 >.</li><li>監視対象サーバー上のデータベースの特定のスキーマのシーケンスに適用できるアラートテンプレートは<b>700</b>です。</li><li>に適用できるアラートテンプレート監視対象サーバー上のデータベースの特定のスキーマのファンクションは<b>800</b>です。</li></ul>注 このプロパティは、POST要求の必須パラメーターです。

» param_names

[string]

false

none

パラメーターの名前を定義します。

» param_types

string

false

none

パラメーターのタイプを定義します。例 INTEGER/STRING..

» params_units

[string]

false

none

パラメーターに使用される単位を定義します。例 'DAYS'、'True or False'、'Hours'、'Minutes'など

» sql

string

false

none

しきい値に到達したことを示す数値を取得するためのSQLクエリー。パラメーター化される場合があります。注 このプロパティは、POST要求の必須パラメーターです。

» applicable_on_server

string

false

none

テンプレートを適用する監視対象サーバーの種類を指定します。使用可能な値は、ALL、POSTGRES_SERVER、およびADVANCED_SERVERです。注 このプロパティは、POST要求の必須パラメーターです。

» default_check_frequency

integer

false

none

このテンプレートで定義されたアラートをチェックする頻度を分単位で定義します。注 このプロパティは、POST要求の必須パラメーターです。

» default_history_retention

integer

false

none

このタイプのアラートの履歴保持期間を日単位で定義します。注 このプロパティは、POST要求の必須パラメーターです。

» probe_dependency_list

[string]

false

none

アラートテンプレートが依存するプローブのリストを定義します。

» threshold_unit

string

false

none

MB/kB/秒/日/...などの、しきい値の計算に使用される単位 この値は、GUIでのみ使用されます。

» is_system_template

boolean

false

none

指定されたテンプレートがシステム定義であるかユーザー定義であるかを判断します。注このプロパティは、POST/PUT要求には適用されません。

» is_auto_create

boolean

false

none

エージェントまたはサーバーがPEMに追加されたらすぐにアラートを作成するかどうかを決定します。注 エージェントおよびサーバーレベル、つまりobject_type 100および200でのみサポートされています。

» operator

string

false

none

しきい値を比較する演算子。エージェントおよびサーバーレベル、つまりobject_type 100および200でのみサポートされています。

» low_threshold_value

number

false

none

低しきい値。エージェントおよびサーバーレベル、つまりobject_type 100および200でのみサポートされています。

» medium_threshold_value

number

false

none

中しきい値。エージェントおよびサーバーレベル、つまりobject_type 100および200でのみサポートされています。

» high_threshold_value

number

false

none

高しきい値。エージェントおよびサーバーレベル、つまりobject_type 100および200でのみサポートされています。

» info_sql

string

false

none

ダッシュボードのアラートに関する詳細情報を提供するSQLクエリーを指定します。

列挙値#

Property

Value

applicable_on_server

ALL

applicable_on_server

POSTGRES_SERVER

applicable_on_server

ADVANCED_SERVER

operator

>

operator

&lt;

注釈

この操作には認証が必要ありません

post_alert_template#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/api/v14/alert/template/ \
  -H Content-Type: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/api/v14/alert/template/, headers = headers)

print(r.json())
const inputBody = {
  "name": "string",
  "description": "string",
  "object_type": 0,
  "params": [
    {
      "param_types": "STRING",
      "param_units": "KK",
      "param_names": "param_1"
    }
  ],
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "default_history_retention": 0,
  "probe_dependency_list": [
    {
      "internal_name": "probe_name"
    }
  ],
  "threshold_unit": "string",
  "is_system_template": false,
  "is_auto_create": true,
  "operator": ">",
  "low_threshold_value": 0,
  "medium_threshold_value": 0,
  "high_threshold_value": 0,
  "info_sql": "string"
};
const headers = {
  Content-Type:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/alert/template/,
{
  method: POST,
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /alert/template/

アラートテンプレートを作成します。

ボディパラメーター

{
  "name": "string",
  "description": "string",
  "object_type": 0,
  "params": [
    {
      "param_types": "STRING",
      "param_units": "KK",
      "param_names": "param_1"
    }
  ],
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "default_history_retention": 0,
  "probe_dependency_list": [
    {
      "internal_name": "probe_name"
    }
  ],
  "threshold_unit": "string",
  "is_system_template": false,
  "is_auto_create": true,
  "operator": ">",
  "low_threshold_value": 0,
  "medium_threshold_value": 0,
  "high_threshold_value": 0,
  "info_sql": "string"
}

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

承認トークン

body

body

AlertTemplatePost

true

なし

応答例

応答#

Status

Meaning

Description

Schema

200

コマンドラインからのサーバーインストーラーの呼び出し

ステータス200

None

レスポンススキーマ#

注釈

この操作には認証が必要ありません

get_alert_template{id}#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/api/v14/alert/template/{id} \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/api/v14/alert/template/{id}, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/alert/template/{id},
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /alert/template/{id}

IDで識別されるアラートテンプレートを取得します。

パラメーター#

Name

In

Type

Required

Description

id

path

integer

true

アラートテンプレートID

X-Auth-Token

header

string

true

承認トークン

応答例

{
  "name": "string",
  "description": "string",
  "object_type": 0,
  "param_names": [
    "string"
  ],
  "param_types": "string",
  "params_units": [
    "string"
  ],
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "default_history_retention": 0,
  "probe_dependency_list": [
    "string"
  ],
  "threshold_unit": "string",
  "is_system_template": false,
  "is_auto_create": true,
  "operator": ">",
  "low_threshold_value": 0,
  "medium_threshold_value": 0,
  "high_threshold_value": 0,
  "info_sql": "string"
}

応答#

注釈

この操作には認証が必要ありません

put_alert_template{id}#

コードサンプル

#  You can also use wget

curl -X PUT https://PEM-SERVER-IP/api/v14/alert/template/{id} \
  -H Content-Type: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  X-Auth-Token: string
}

r = requests.put(https://PEM-SERVER-IP/api/v14/alert/template/{id}, headers = headers)

print(r.json())
const inputBody = {
  "name": "string",
  "description": "string",
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "default_history_retention": 0,
  "probe_dependency_list": {
    "deleted": [
      {
        "internal_name": "probe_name"
      }
    ],
    "added": [
      {
        "internal_name": "probe_name"
      }
    ]
  },
  "threshold_unit": "string",
  "is_system_template": false,
  "info_sql": "string"
};
const headers = {
  Content-Type:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/alert/template/{id},
{
  method: PUT,
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /alert/template/{id}

アラートテンプレートを更新します。

ボディパラメーター

{
  "name": "string",
  "description": "string",
  "sql": "string",
  "applicable_on_server": "ALL",
  "default_check_frequency": 0,
  "default_history_retention": 0,
  "probe_dependency_list": {
    "deleted": [
      {
        "internal_name": "probe_name"
      }
    ],
    "added": [
      {
        "internal_name": "probe_name"
      }
    ]
  },
  "threshold_unit": "string",
  "is_system_template": false,
  "info_sql": "string"
}

パラメーター#

Name

In

Type

Required

Description

id

path

integer

true

アラートテンプレートID

X-Auth-Token

header

string

true

承認トークン

body

body

AlertTemplatePut

true

なし

応答例

応答#

Status

Meaning

Description

Schema

200

コマンドラインからのサーバーインストーラーの呼び出し

ステータス200

None

レスポンススキーマ#

注釈

この操作には認証が必要ありません

delete_alert_template{id}#

コードサンプル

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/api/v14/alert/template/{id} \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/api/v14/alert/template/{id}, headers = headers)

print(r.json())
const headers = {
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/alert/template/{id},
{
  method: DELETE,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /alert/template/{id}

アラートテンプレートを削除します。

パラメーター#

Name

In

Type

Required

Description

id

path

integer

true

アラートテンプレートID

X-Auth-Token

header

string

true

承認トークン

応答例

応答#

Status

Meaning

Description

Schema

200

コマンドラインからのサーバーインストーラーの呼び出し

削除が成功しました。

None

レスポンススキーマ#

注釈

この操作には認証が必要ありません