Profiles#

Manage Profiles API ドラフトを作成、リスト、更新、公開/ロールバック、およびサーバーとエージェントのプロファイルの再割り当て/削除を行います。

get_profiles#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/ \
  -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/pem/api/v17/profiles/, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/", {
  method: "GET",

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

GET /profiles/

リストプロファイル

公開されたプロファイルのみの概要リストを返します。公開されたプロファイルの下書きが存在する場合、項目にはそのプロファイルのIDが示され、 ’published’はfalseです。応答には、’target_probe_configs’または’target_alert_configs’は含まれません。 name 完全一致またはname_contains 部分文字列検索クエリパラメーターを介してオプションの名前ベースのフィルタリングをサポートします。

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

認証用のトークン

name

query

string

false

名前の完全な一致大文字と小文字を区別してプロファイルをフィルタリングします。 name_containsと相互排他的。

name_contains

query

string

false

部分文字列一致大文字と小文字を区別してプロファイルをフィルタリングします。 nameと相互排他的。

応答例

[
  {
    "id": 34,
    "name": "Production Agents",
    "description": "Monitoring production agents",
    "target_kind": "a",
    "active_assignments": 0,
    "published": true
  }
]

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

Inline

400

Bad Request

相互排他性違反 `name`または類似の完全一致フィルタと`name_contains`または類似の部分文字列フィルタが両方とも同じ要求で指定されました。フィルタリングは、ペアのうちの1つのみを受け入れます。

Inline

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

_anonymous_

Platform Compatibility ]

false

none

[リスト操作のトリミングされたプロファイル表現形式プローブ/アラート構成配列なし。

» id

integer

false

none

なし

» name

string

false

none

なし

» description

string

false

none

なし

» target_kind

string

false

none

プロファイルのターゲットタイプサーバーの場合は's'、エージェントの場合は'a'。

» published

boolean

false

none

コンビニエンスフラグ ステータスが'published'の場合にtrue。

» active_assignments

integer

false

none

このプロファイルに割り当てられたアクティブなサーバー/エージェントの数。

列挙値#

Property

Value

target_kind

s

target_kind

a

ステータスコード 400

Name

Type

Required

Restrictions

Description

» success

integer

false

none

なし

» errormsg

string

false

none

なし

注釈

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

post_profiles#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/pem/api/v17/profiles/ \
  -H Content-Type: application/json \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profiles/, headers = headers)

print(r.json())
const inputBody = {
  "name": "Production Servers",
  "description": "Monitoring production database servers",
  "target_kind": "s"
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

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

POST /profiles/

新しいプロフィールを作成する

指定された名前必須、説明オプショナル、およびtarget_kindオプショナル、サーバーのデフォルト’s’を使用して新しいプロファイルを作成します。プローブと自動作成アラートは、target_kindに基づいて自動的に作成されます。

ボディパラメーター

{
  "name": "Production Servers",
  "description": "Monitoring production database servers",
  "target_kind": "s"
}

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

承認用トークン

body

body

object

false

なし

» name

body

string

true

プロフィール名 必須

» description

body

string

false

プロファイルの説明オプショナル

» target_kind

body

string

false

ターゲット種類 サーバーの場合は's'、エージェントの場合は'a'オプショナル、デフォルトは's'

列挙値#

Parameter

Value

» target_kind

s

» target_kind

a

応答例

{
  "success": 0,
  "data": "string"
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルが正常に作成されました

Inline

400

Bad Request

悪い要求-必須フィールド'name'が欠落しています

None

500

Internal Server Error

内部サーバーエラー

None

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» success

integer

false

none

なし

» data

string

false

none

なし

注釈

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

get_profiles{profile_id}#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_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/pem/api/v17/profiles/{profile_id}, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}", {
  method: "GET",

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

GET /profiles/{profile_id}

IDでプロフィールを取得

完全なプローブとアラート構成を含む単一のプロファイルを結果ます。応答には、ブール値の’published’フィールドプロフィールが公開された場合にtrueが含まれます。

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "id": 0,
  "name": "string",
  "description": "string",
  "target_kind": "s",
  "published": true,
  "parent_id": 0,
  "draft_id": 0,
  "target_probe_configs": [
    {
      "probe_id": 0,
      "probe_name": "string",
      "enabled": true,
      "interval": 0,
      "lifetime": 0,
      "default_enabled": true,
      "default_interval": 0,
      "default_lifetime": 0,
      "target_type": 0,
      "force_enabled": true
    }
  ],
  "target_alert_configs": [
    {
      "id": 0,
      "alert_name": "string",
      "alert_template": 0,
      "description": "string",
      "enabled": true,
      "history_retention": 0,
      "frequency_min": 0,
      "auto_created": true,
      "template_id": "string",
      "params": [],
      "param_names": ["string"],
      "param_types": "string",
      "params_units": ["string"],
      "threshold_unit": "string",
      "operator": "string",
      "low_threshold_value": 0,
      "medium_threshold_value": 0,
      "high_threshold_value": 0,
      "send_email": true,
      "all_alert_enable": true,
      "email_group_id": 0,
      "low_alert_enable": true,
      "low_email_group_id": 0,
      "med_alert_enable": true,
      "med_email_group_id": 0,
      "high_alert_enable": true,
      "high_email_group_id": 0,
      "send_trap": true,
      "snmp_trap_version": 0,
      "low_send_trap": true,
      "med_send_trap": true,
      "high_send_trap": true,
      "cleared_alert_enable": true,
      "execute_script": true,
      "execute_script_on_clear": true,
      "execute_script_on_pem_server": true,
      "script_code": "string",
      "submit_to_nagios": true,
      "override_default_config": true,
      "send_notification": true,
      "low_webhook_ids": [0],
      "med_webhook_ids": [0],
      "high_webhook_ids": [0],
      "cleared_webhook_ids": [0]
    }
  ]
}

プロファイルが見つかりません

{
  "message": "Not found"
}

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

Upgrading SQL Profiler

404

Not Found

プロファイルが見つかりません

Inline

レスポンススキーマ#

ステータスコード 404

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

注釈

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

put_profiles{profile_id}#

コードサンプル

#  You can also use wget

curl -X PUT https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id} \
  -H Content-Type: application/json \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.put(https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}, headers = headers)

print(r.json())
const inputBody = {
  "name": "Production Servers (v2)",
  "description": "Tightened thresholds and probe intervals.",
  "target_probe_configs": {
    "changed": [
      {
        "probe_id": 7,
        "execution_frequency": 5,
        "lifetime": 60
      },
      {
        "probe_id": 15,
        "enabled": true,
        "execution_frequency": 10,
        "lifetime": 30
      }
    ]
  },
  "target_alert_configs": {
    "changed": [
      {
        "id": 101,
        "enabled": true,
        "frequency_min": 2
      },
      {
        "id": 102,
        "operator": ">",
        "low_threshold_value": 70,
        "medium_threshold_value": 85,
        "high_threshold_value": 95
      }
    ],
    "added": [
      {
        "alert_name": "Replication Lag",
        "alert_template": 18,
        "enabled": true,
        "history_retention": 30,
        "frequency_min": 5,
        "operator": ">",
        "medium_threshold_value": 60,
        "high_threshold_value": 120
      }
    ],
    "deleted": [
      {
        "id": 103
      }
    ]
  }
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id},
{
  method: PUT,
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /profiles/{profile_id}

IDでプロフィールを更新する

‘profile_id’で指定される単一のプロファイルを更新します。メタデータには’name’/’description’を使用します。プローブの場合、 ’target_probe_configs.changed’を使用して、既存のプローブ構成のみを変更しますキーはprobe_id、 enabled?、 enabled_by_default?、execute_frequency?、lifetime?。従来の ’use_default_enabled’および’interval’も受け入れます。このエンドポイントを介したプローブの追加はサポートされていません。アラートの場合、変更/追加/削除とともに’target_alert_configs’を使用します削除は、’id’のみを持つオブジェクトを受け入れます。

ボディパラメーター

{
  "name": "Production Servers (v2)",
  "description": "Tightened thresholds and probe intervals.",
  "target_probe_configs": {
    "changed": [
      {
        "probe_id": 7,
        "execution_frequency": 5,
        "lifetime": 60
      },
      {
        "probe_id": 15,
        "enabled": true,
        "execution_frequency": 10,
        "lifetime": 30
      }
    ]
  },
  "target_alert_configs": {
    "changed": [
      {
        "id": 101,
        "enabled": true,
        "frequency_min": 2
      },
      {
        "id": 102,
        "operator": ">",
        "low_threshold_value": 70,
        "medium_threshold_value": 85,
        "high_threshold_value": 95
      }
    ],
    "added": [
      {
        "alert_name": "Replication Lag",
        "alert_template": 18,
        "enabled": true,
        "history_retention": 30,
        "frequency_min": 5,
        "operator": ">",
        "medium_threshold_value": 60,
        "high_threshold_value": 120
      }
    ],
    "deleted": [
      {
        "id": 103
      }
    ]
  }
}

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

body

body

object

true

なし

» name

body

string

false

プロファイルの新しい名前オプショナル。

» description

body

string

false

プロファイルの新しい説明/注意事項オプショナル。

» target_probe_configs

body

ProbeConfigsUpdateOnly

false

プロファイルIDで更新する場合のプローブ構成のデルタ 'changed'を使用して既存のプローブのみを変更します。このエンドポイントを介したプローブの追加はサポートされていません。

»» changed

body

Platform Compatibility ]

false

変更する既存のプローブ構成probe_idで識別されます。

»»» probe_id

body

integer

true

追加/更新するプローブ識別子。

»»» enabled

body

boolean

false

プロファイルでこのプローブを有効/無効にします。

»»» enabled_by_default

body

boolean

false

プローブがデフォルトの有効化に従うかどうか。エイリアス 'use_default_enabled'が受け入れられます。

»»» execution_frequency

body

integer

false

分単位のプローブ実行頻度。エイリアス'interval'が受け入れられます。

»»» lifetime

body

integer

false

履歴の保持日数。

» target_alert_configs

body

AlertConfigsDelta

false

プロファイル内のアラート構成のデルタ。

»» changed

body

[allOf]

false

既存のアラートを変更します。

»»» id

body

integer

false

変更するアラートID。

»»» name

body

string

false

アラート名。

»»» enabled

body

boolean

false

なし

»»» history_retention

body

integer

false

なし

»»» frequency_min

body

integer

false

なし

»»» operator

body

string

false

なし

»»» low_threshold_value

body

number

false

なし

»»» medium_threshold_value

body

number

false

なし

»»» high_threshold_value

body

number

false

なし

»»» all_alert_enable

body

boolean

false

なし

»»» email_group_id

body

integer

false

なし

»»» low_alert_enable

body

boolean

false

なし

»»» low_email_group_id

body

integer

false

なし

»»» med_alert_enable

body

boolean

false

なし

»»» med_email_group_id

body

integer

false

なし

»»» high_alert_enable

body

boolean

false

なし

»»» high_email_group_id

body

integer

false

なし

»» added

body

Platform Compatibility ]

false

新しいアラートを追加します。必須フィールドについては、AlertPayloadを参照してください。

»»» alert_name

body

string

false

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

»»» alert_template

body

integer

false

アラートテンプレートのID。 IDは正の整数値である必要があります。注 このプロパティは、POST要求の必須パラメーターです。

»»» description

body

string

false

なし

»»» enabled

body

boolean

false

このアラートを有効/無効にするかどうかを定義します。注 このプロパティは、POST要求の必須パラメーターです。

»»» history_retention

body

integer

false

このアラートの履歴を保持する日数を指定します。指定できる値は1〜99999です。 注このプロパティは、POST要求の必須パラメーターです。

»»» frequency_min

body

integer

false

PEMデータベースサーバーでアラートを確認する頻度を分単位で定義します。指定できる値は1〜65534です。 注このプロパティは、POST要求の必須パラメーターです。

»»» operator

body

string

false

しきい値をチェックするための演算子を定義します。有効な文字列は>"および"<"です。注 このプロパティは、POST要求の必須パラメーターです。

»»» low_threshold_value

body

number

false

低アラートをトリガーするためのしきい値。このプロパティには、有効な整数/浮動小数点値を指定できます。注これはPOST要求の必須パラメーターです。

»»» medium_threshold_value

body

number

false

中アラートをトリガーするためのしきい値。このプロパティには、有効な整数/浮動小数点値を指定できます。注これはPOST要求の必須パラメーターです。

»»» high_threshold_value

body

number

false

高度なアラートをトリガーするためのしきい値。このプロパティには、有効な整数/浮動小数点値を指定できます。注これはPOST要求の必須パラメーターです。

»»» all_alert_enable

body

boolean

false

アラートの状態が変更されたときに、パラメーター 'email_group_id'で指定されたグループにメール通知を送信するかどうかを決定します。

»»» email_group_id

body

integer

false

アラートの状態が変更されたときに、メール通知の送信先のメールグループを定義します。

»»» low_alert_enable

body

boolean

false

アラートの状態がLOWに設定されているときに、パラメーター'low_email_group_id'で指定されたグループにメール通知を送信するかどうかを決定します。

»»» low_email_group_id

body

integer

false

アラートの状態がLOWに変更されたときにメール通知の送信先の電子メールグループを定義します。

»»» med_alert_enable

body

boolean

false

アラートの状態がMEDIUMに設定されている場合、パラメーター'medium_email_group_id'で指定されたグループにメール通知を送信するかどうかを決定します。

»»» med_email_group_id

body

integer

false

アラートの状態がMEDIUMに変更されたときにメール通知の送信先のメールグループを定義します。

»»» high_alert_enable

body

boolean

false

アラートの状態がHIGHに設定されているときに、パラメーター'high_email_group_id'で指定されたグループに電子メール通知を送信するかどうかを決定します。

»»» high_email_group_id

body

integer

false

アラートの状態がHIGHに変更されたときに電子メール通知の送信先の電子メールグループを定義します。

»»» send_trap

body

boolean

false

アラートの状態が変更されたときにSNMPトラップ通知を送信するかどうかを決定します。

»»» snmp_trap_version

body

integer

false

SNMPトラップバージョンを定義します。サポートされているSNMPトラップバージョンは1、2、または3です。

»»» low_send_trap

body

boolean

false

アラートの状態がLOWに変更されたときにSNMPトラップ通知を送信するかどうかを決定します。

»»» med_send_trap

body

boolean

false

アラートの状態がMEDIUMに変更されたときにSNMPトラップ通知を送信するかどうかを決定します。

»»» high_send_trap

body

boolean

false

アラートの状態がHIGHに変化したときにSNMPトラップ通知を送信するかどうかを決定します。

»»» cleared_alert_enable

body

boolean

false

'クリアアラート'の通知をミュートするかどうかを決定します。

»»» params

body

Platform Compatibility ]

false

アラートを確認するためにアラートテンプレートが使用するパラメーター/値のペアのリスト。注 アラートテンプレートには、 allパラメーターを定義する必要があります。

»»»» paramname

body

string

false

パラメーターの名前。注このプロパティは、アラートテンプレートパラメーターリストに存在する必要があります。例

»»»» paramvalue

body

string

false

指定されたパラメーターの値

»»» execute_script

body

boolean

false

アラートの状態がLOW/MEDIUM/HIGHに変更された場合に、提供されたスクリプトを実行するかどうかを決定します。

»»» execute_script_on_clear

body

boolean

false

アラートの状態がクリアされた場合、提供されたスクリプトを実行するかどうかを決定します。

»»» execute_script_on_pem_server

body

boolean

false

提供されたスクリプトをPEMホストまたはエージェントがオブジェクトを監視しているホストで実行するかどうかを決定します。

»»» script_code

body

string

false

実行するシェルまたはバッチスクリプト。詳細については、ドキュメントをご覧ください。

»»» submit_to_nagios

body

boolean

false

アラートの状態が変更されたときに、nagiosに通知を送信するかどうかを定義します。

»»» override_default_config

body

boolean

false

デフォルトのWebhook構成をオーバーライドするかどうかを決定します。

»»» send_notification

body

boolean

false

Webhook送信通知を有効にするかどうかを決定します。

»»» low_webhook_ids

body

[integer]

false

低アラートを構成できるWebhook IDを定義します。

»»» med_webhook_ids

body

[integer]

false

中程度のアラートを構成できるWebhook IDを定義します。

»»» high_webhook_ids

body

[integer]

false

高アラートを構成できるWebhook IDを定義します。

»»» cleared_webhook_ids

body

[integer]

false

クリアされたアラートを構成できるWebhook IDを定義します。

»» deleted

body

Platform Compatibility ]

false

IDごとに既存のアラートを削除します。

»»» id

body

integer

true

削除するアラート構成ID。

列挙値#

Parameter

Value

»»» operator

>

»»» operator

<

»»»» paramname

Exclude tables smaller than

»»»» paramname

mount point

»»»» paramname

Host IP Address

»»»» paramname

Time interval to monitor

»»»» paramname

Time since idle

»»»» paramname

Per CPU utilization (K%)

応答例

{
  "message": "Invalid JSON body"
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルが正常に更新されました

None

400

Bad Request

無効なJSON本文

None

レスポンススキーマ#

注釈

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

delete_profiles{profile_id}#

コードサンプル

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id} \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}", {
  method: "DELETE",

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

DELETE /profiles/{profile_id}

プロフィールを削除する

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

応答#

Status

Meaning

Description

Schema

200

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

プロファイルは正常に削除されました

None

レスポンススキーマ#

注釈

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

get_profiles{profile_id}_assigned#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/assigned \
  -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/pem/api/v17/profiles/{profile_id}/assigned, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/assigned", {
  method: "GET",

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

GET /profiles/{profile_id}/assigned

プロファイルに割り当てられたサーバーとエージェントを取得する

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "servers": ["string"],
  "agents": ["string"]
}

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

Inline

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» servers

[string]

false

none

なし

» agents

[string]

false

none

なし

注釈

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

get_profiles{profile_id}_draft#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/draft \
  -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/pem/api/v17/profiles/{profile_id}/draft, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/draft", {
  method: "GET",

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

GET /profiles/{profile_id}/draft

プロフィールIDでドラフトを取得

完全なプローブとアラート構成を含む、指定された公開プロファイルIDに関連付けられているドラフトプロファイルを結果ます。応答には、parent_idまたはdraft_idフィールドは含まれません。

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "id": 0,
  "name": "string",
  "description": "string",
  "target_kind": "s",
  "published": true,
  "target_probe_configs": [
    {
      "probe_id": 0,
      "probe_name": "string",
      "enabled": true,
      "interval": 0,
      "lifetime": 0,
      "default_enabled": true,
      "default_interval": 0,
      "default_lifetime": 0,
      "target_type": 0,
      "force_enabled": true
    }
  ],
  "target_alert_configs": [
    {
      "id": 0,
      "alert_name": "string",
      "alert_template": 0,
      "description": "string",
      "enabled": true,
      "history_retention": 0,
      "frequency_min": 0,
      "auto_created": true,
      "template_id": "string",
      "params": [],
      "param_names": ["string"],
      "param_types": "string",
      "params_units": ["string"],
      "threshold_unit": "string",
      "operator": "string",
      "low_threshold_value": 0,
      "medium_threshold_value": 0,
      "high_threshold_value": 0,
      "send_email": true,
      "all_alert_enable": true,
      "email_group_id": 0,
      "low_alert_enable": true,
      "low_email_group_id": 0,
      "med_alert_enable": true,
      "med_email_group_id": 0,
      "high_alert_enable": true,
      "high_email_group_id": 0,
      "send_trap": true,
      "snmp_trap_version": 0,
      "low_send_trap": true,
      "med_send_trap": true,
      "high_send_trap": true,
      "cleared_alert_enable": true,
      "execute_script": true,
      "execute_script_on_clear": true,
      "execute_script_on_pem_server": true,
      "script_code": "string",
      "submit_to_nagios": true,
      "override_default_config": true,
      "send_notification": true,
      "low_webhook_ids": [0],
      "med_webhook_ids": [0],
      "high_webhook_ids": [0],
      "cleared_webhook_ids": [0]
    }
  ]
}

プロファイルのドラフトが見つかりません

{
  "message": "Not found"
}

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

プロフィールドラフト

404

Not Found

プロファイルのドラフトが見つかりませんでした

Inline

レスポンススキーマ#

ステータスコード 404

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

注釈

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

delete_profiles{profile_id}_rollback#

コードサンプル

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/rollback \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/rollback, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/rollback", {
  method: "DELETE",

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

DELETE /profiles/{profile_id}/rollback

プロファイルのロールバックドラフト

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

応答#

Status

Meaning

Description

Schema

200

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

下書きが削除されたか、使用可能なドラフトがありません

None

レスポンススキーマ#

注釈

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

post_profiles{profile_id}_publish#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/publish \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/publish, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/publish", {
  method: "POST",

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

POST /profiles/{profile_id}/publish

プロフィールを公開する

指定されたプロファイルが存在する場合、そのドラフトを公開します。ドラフトが存在しない場合、プロファイルが既に公開されていることを示すメッセージを返します。

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "message": "Not found"
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルは正常に公開されたか、既に公開されました

None

404

Not Found

プロファイルが見つかりません

Inline

レスポンススキーマ#

ステータスコード 404

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

注釈

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

post_profiles{source_id}_clone#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/pem/api/v17/profiles/{source_id}/clone \
  -H Content-Type: application/json \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profiles/{source_id}/clone, headers = headers)

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

fetch("https://PEM-SERVER-IP/pem/api/v17/profiles/{source_id}/clone", {
  method: "POST",
  body: inputBody,
  headers: headers,
})
  .then(function (res) {
    return res.json();
  })
  .then(function (body) {
    console.log(body);
  });

POST /profiles/{source_id}/clone

既存のプロファイルのクローンを作成する

すべてのプローブとアラート構成をソースからコピーすることにより、新しい公開プロファイルを作成します。ソースは公開されたプロファイルである必要があります。ドラフトのクローン作成は400で拒否されます。クローンはソースから独立しています。parent_idはNULL、ステータスは「published」、アクティブな割り当てはありません。クローンは1つのPEMインスタンス内で発生するため、すべての通知チャネルID電子メールグループ、Webhook ID、SNMPトラップフィールドはそのままコピーされます。自動作成されたアラートはコピーされ、クローンに削除できません。 ‘name’が省略されると、サーバーは’Copy of ’を生成し、名前が公開されたプロファイル間で一意になるまで、’ (2)‘、’ (3)’、…を追加します。

ボディパラメーター

{}

パラメーター#

Name

In

Type

Required

Description

source_id

path

integer

true

クローンする公開されたプロファイルのID。

X-Auth-Token

header

string

true

承認用トークン

body

body

object

false

なし

» name

body

string

false

オプショナル。クローンの名前。公開されたプロファイル間で一意である必要があります。そうでない場合、要求は409を返します。省略すると、サーバーは競合回避で'Copy of <source />'を生成します。

» description

body

string

false

オプショナル。クローンの説明。省略すると、ソースの説明がコピーされます。明示的な空の文字列は説明をクリアします。

応答例

{
  "success": 1,
  "data": {
    "id": 42,
    "name": "Copy of Production Servers",
    "target_kind": "s",
    "description": "Monitoring production database servers"
  }
}

不正な要求。ソースはドラフトであり、クローンはできません。指定された名前が空である、自動生成された名前が使い果たされた、または ‘name’ / ’description’は文字列ではありません。

{
  "errormsg": "Cannot clone a draft profile. Publish or rollback the draft first."
}

ソースプロファイルが見つかりません。

{
  "message": "Profile 999 does not exist."
}

409 レスポンス

{
  "message": "string"
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルのクローンが正常に作成されました。

Inline

400

Bad Request

悪い要求。ソースはドラフトであり、クローンはできません。指定された名前が空である、自動生成された名前が使い果たされた、または 'name' / 'description'は文字列ではありません。

Inline

404

Not Found

ソースプロファイルが見つかりません。

Inline

409

既存のmod_wsgiとの競合

ユーザー指定の'name'は、既存の公開されたプロファイルと競合します。

Inline

500

Internal Server Error

内部サーバーエラー。

None

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» success

integer

false

none

なし

» data

object

false

none

なし

»» id

integer

false

none

新しいプロファイルのID。

»» name

string

false

none

なし

»» target_kind

string

false

none

ソースから保存。クローン時には変更できません。

»» description

string¦null

false

none

なし

列挙値#

Property

Value

target_kind

s

target_kind

a

ステータスコード 400

Name

Type

Required

Restrictions

Description

» errormsg

string

false

none

なし

ステータスコード 404

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

ステータスコード 409

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

注釈

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

delete_profiles{profile_id}_{new_profile_id}#

コードサンプル

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/{new_profile_id} \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/{new_profile_id}, headers = headers)

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

fetch(
  "https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/{new_profile_id}",
  {
    method: "DELETE",

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

DELETE /profiles/{profile_id}/{new_profile_id}

プロファイルを削除し、新しいプロファイルに再割り当てします

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

new_profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

応答#

Status

Meaning

Description

Schema

200

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

プロファイルは正常に削除および再割り当てされました

None

レスポンススキーマ#

注釈

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

post_profile_export#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/pem/api/v17/profile/export/ \
  -H Content-Type: application/json \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profile/export/, headers = headers)

print(r.json())
const inputBody = {
  "profiles": [
    0
  ]
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

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

POST /profile/export/

プロファイルをJSONバンドルにエクスポートする

.pemprf JSONバンドルとしてシリアル化された要求されたプロファイルを返します。ドラフトを選択すると、公開された親に透過的に解決されます。すべての電子メール/SNMP/webhook/Nagiosチャネル構成はエクスポート時にストリップされます—ルーティングID email_group_id 、*_email_group_id 、* _webhook_ids 、snmp_trap_version 、*_send_trap および有効化フラグsend_email 、send_trap 、submit_to_nagios 、cleared_alert_enable 、send_notification 、受信者opt2のイネーブルフラグcleared_alert_enable 、send_notification 、edb_tran_s_opt2インポート後のUIを介してチャンネルごとに。スクリプトの実行 execute_script 、execute_script_on_clear 、execute_script_on_pem_server 、およびscript_code 本体は保持されます。 script_code には資格情報またはenv固有のパスが含まれる場合があるため、 .pemprf ファイルを機密ファイルとして扱います。

ボディパラメーター

{
  "profiles": [0]
}

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

承認用トークン

body

body

object

true

なし

» profiles

body

[integer]

true

エクスポートするプロファイルID。

応答例

{
  "version": 0,
  "profiles": [{}]
}

応答#

Status

Meaning

Description

Schema

200

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

バンドルapplication/jsonをエクスポートします。

Inline

400

Bad Request

エクスポートするプロファイルがありません、プロファイルIDが見つかりません、孤立したドラフト、または解決されたプロファイルは公開されません。

None

401

Unauthorized

ユーザーには`pem_manage_profile`ロールがありません。

None

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» version

integer

false

none

エクスポートファイル形式のバージョン。

» profiles

[object]

false

none

なし

注釈

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

post_profile_import#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/pem/api/v17/profile/import/ \
  -H Content-Type: application/json \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profile/import/, headers = headers)

print(r.json())
const inputBody = {
  "version": 0,
  "profiles": [
    {}
  ],
  "skip_overwrite": true
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

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

POST /profile/import/

以前にエクスポートしたプロファイルをインポートする

ファイル内の各プロファイルは独立して処理されます。新しい名前は公開されたとおりに着陸します。名前の競合 デフォルトのSkipped skip_overwrite=trueか、既存のプロファイルの構成をドラフトとして置き換えますskip_overwrite=false — ユーザーはUIで[適用]をクリックして公開します。応答は、プロファイルごとに1つの結果を伝送します。statusはSuccess 、Skipped 、またはFailed で、 msg は部分スキップの詳細プローブ/テンプレート参照の欠如を説明します。

ボディパラメーター

{
  "version": 0,
  "profiles": [{}],
  "skip_overwrite": true
}

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

承認用トークン

body

body

object

true

なし

» version

body

integer

true

エクスポートファイル形式のバージョン。ターゲットサーバーでサポートされている必要があります。

» profiles

body

[object]

true

なし

» skip_overwrite

body

boolean

true

trueの場合、名前の競合により`Skipped`が生成されます。 falseの場合、インポーターは既存のプロファイルにドラフトを作成しますレビューと公開に適用します。

応答例

{
  "success": 0,
  "result": [
    {
      "name": "string",
      "status": "Success",
      "msg": "string"
    }
  ]
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルごとのインポート結果。

Inline

400

Bad Request

不正なペイロード、skip_overwriteの欠落、またはサポートされていないバージョン。

None

401

Unauthorized

ユーザーには`pem_manage_profile`ロールがありません。

None

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» success

integer

false

none

なし

» result

[object]

false

none

なし

»» name

string

false

none

なし

»» status

string

false

none

なし

»» msg

string¦null

false

none

なし

列挙値#

Property

Value

status

Success

status

Skipped

status

Failed

注釈

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