Custom Probe#
get_probe#
コードサンプル
# You can also use wget
curl -X GET https://PEM-SERVER-IP/api/v14/probe/ \
-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/probe/, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/probe/,
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /probe/
すべてのカスタム/システムプローブを取得します。
パラメーター#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
X-Auth-Token |
header |
string |
true |
承認トークン |
応答例
[
{
"probe_id": 0,
"probe_name": "string",
"enabled": true,
"target_type": 0,
"internal_name": "string",
"is_system_probe": true,
"any_server_version": true,
"collection_method": "w",
"interval": 0,
"lifetime": 0,
"discard_history": true,
"platform": "unix",
"probe_code": "string",
"probe_columns": [
{
"pc_id": 0,
"pc_name": "string",
"pc_data_type": "bigint",
"pc_internal_name": "string",
"pc_unit": "string",
"pc_col_type": "m",
"pc_position": 0,
"pc_graphable": true,
"pc_calc_pit": true,
"pc_pit_default": true
}
],
"alternate_code": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
]
}
]
応答#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
成功した応答 |
Inline |
レスポンススキーマ#
ステータスコード 200
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
anonymous |
false |
none |
なし |
|
» probe_id |
integer |
false |
none |
プローブの識別子 |
» probe_name |
string |
false |
none |
プローブの名前 |
» enabled |
boolean |
false |
none |
プローブがデフォルトで有効か無効かを決定します。 |
» target_type |
integer |
false |
none |
プローブが適用されるオブジェクトのタイプを定義します。 <ul><li>target_type <b>100</b>のプローブは、エージェントの統計を収集します。</li><li>target_type <b>200</b>のプローブは、収集を担当します。 </li><li>target_type <b>300</b>のプローブは、データベースの統計を収集します。</li><li>target_type <b>400<のプローブ/b>は、スキーマの統計を収集します。</li><li>target_type <b>500</b>のプローブは、テーブルの統計を収集します。</li><li>次のプローブtarget_type <b>600</b>は、インデックスの統計を収集します。</li><li>target_type <b>700</b>のプローブは、シーケンスの統計を収集します。</li> <li>target_type <b>800</b>のプローブは、ファンクションの統計を収集します。</li><li>target_type <b>900</b>のプローブは、ファンクションの統計を収集します。 view.</li><li>target_type <b>1000</b>のプローブは、エクステンの統計を収集します。 </li></ul> |
» internal_name |
string |
false |
none |
プローブの内部名を定義します。 PEMシステムは、プローブ統計を'pemdata'および'pemhistory'スキーマに保存するための内部テーブルを作成します。これらのテーブルの名前は、内部名と同じです。 |
» is_system_probe |
boolean |
false |
none |
このプローブがユーザー定義であるかどうかを判断します。ユーザー定義プローブのこのフラグは常にfalseです。 |
» any_server_version |
boolean |
false |
none |
このプローブはPostgresバリアントのバージョンに適用されるかどうかを判断します。詳細については、ドキュメントを参照してください。 |
» collection_method |
string |
false |
none |
統計収集の方法を定義します。 PEMは、カスタムメイドのプローブの3つの方法SQL、WMI、またはバッチ/シェルスクリプトをサポートしています。 <ul><li>'w'はWMIスクリプトを表します。このタイプのスクリプトはWindowsプラットフォームにのみ適用され、target_typeは<b>100</b>エージェント用です。</li><li>'b'はバッチ/シェルスクリプトを表します。このスクリプトの'target_type'は常に<b>100</b>エージェントです。このスクリプトは、 Windowsではバッチスクリプトとして、他のプラットフォームではシェルスクリプトとして動作します。</li><li>'s'はSQLスクリプトの略です。 'target_type'は常に <b>200</b>サーバー、 <b>300</b>データベース、 <b>400</b>スキーマ、 <b>500</b>です。テーブル、 <b>600</b>インデックス、 <b>700</b>シーケンス、 <b>800</b>ファンクション、または <b>900</b> view)、または<b>1000</b>拡張機能。 </li></ul> |
» interval |
integer |
false |
none |
プローブが統計を収集する頻度を秒単位で定義します。10以上である必要があります |
» lifetime |
integer |
false |
none |
履歴データの保持期間を日単位で定義します。有効な範囲は1〜365です。 'discard_history'がtrueに設定されている場合、この値は効果がありません。 |
» discard_history |
boolean |
false |
none |
履歴データを破棄するかどうかを決定します。 'discard_history'がfalseに設定されている場合、このプローブのデータの履歴は保存されません。 |
» platform |
string |
false |
none |
このプローブを実行できるプラットフォームを定義します。この値は、エージェントレベルのプローブにのみ適用されます。 |
» probe_code |
string |
false |
none |
コードの定義に従って統計を収集するための<b> SQL/Batchスクリプト/シェルスクリプト/WMIスクリプト</b>。 |
» probe_columns |
[object] |
false |
none |
なし |
»» pc_id |
integer |
false |
none |
列識別子 |
»» pc_name |
string |
false |
none |
カラム名 |
»» pc_data_type |
string |
false |
none |
列のデータ型。サポートされているデータ型は次のとおりです。<ul><ul>bigint</ul><ul>char</ul><ul>10進数</ul><ul>倍精度</ul><ul>整数</ul><ul >数値</ul><ul>実数</ul><ul>テキスト</ul><ul>text[]</ul><ul>timestamp</ul><ul>timestamptz</ul>< /ul> |
»» pc_internal_name |
string |
false |
none |
列の内部名を返します。 |
»» pc_unit |
string |
false |
none |
列の単位を返します。 |
»» pc_col_type |
string |
false |
none |
列を内部テーブルの主キーの一部として返すか、否か。 'k'はキー列を表し、'm'はメンバー/ノーマル列を表します。 |
»» pc_position |
integer |
false |
none |
内部テーブルの列の位置を返します。 |
»» pc_graphable |
boolean |
false |
none |
列のデータをチャートにグラフ化できるかどうかを決定します。 |
»» pc_calc_pit |
boolean |
false |
none |
サーバーがこの列のメトリックデータのポイントインタイムを計算するかどうかを決定します。 |
»» pc_pit_default |
boolean |
false |
none |
メトリックをデフォルトでポイントインタイムで保存するかどうかを決定します。詳細については、ドキュメントの'Custom Probes'セクションを参照してください。 |
» alternate_code |
false |
none |
なし |
|
»» server_version_id |
integer |
false |
none |
監視対象サーバーのサーバーバージョンID<table class="model"><thead><tr><th>server_version_id</th><th>Database Server</th></tr></thead><thead /> <tbody><tr><td>10905</td><td>PostgreSQL 9.5</td></tr><tr><td>10906</td><td>PostgreSQL 9.6</td></tr ><tr><td>11000</td><td>PostgreSQL 10</td></tr><tr><td>11100</td><td>PostgreSQL 11</td></tr>< tr><td>11200</td><td>PostgreSQL 12</td></tr><tr><td>11300</td><td>PostgreSQL 13</td></tr><tr> <td>20905</td><td>Postgres Plus Advanced Server 9.5</td></tr><tr><td>20906</td><td>Postgres Plus Advanced Server 9.6</td></tr ><tr><td>21000</td><td> EDB Postgres Advanced Server 10</td></tr><tr><td>21100</td><td> EDB Postgres Advanced Server 11</td ></tr><tr><td>21200 </td><td> EDB Postgres Advanced Server 12</td></tr><tr><td>21300 </td><td> EDB Postgres Advanced Server 13</td></tr></tbody></table> |
»» server_probe_code |
string |
false |
none |
指定されたサーバーバージョンで実行するSQLクエリー |
»» extension_version |
integer |
false |
none |
拡張機能のバージョンを指定します。拡張ターゲットタイプに有効な |
列挙値#
Property |
Value |
|---|---|
collection_method |
w |
collection_method |
b |
collection_method |
s |
platform |
unix |
platform |
windows |
pc_data_type |
bigint |
pc_data_type |
char |
pc_data_type |
decimal |
pc_data_type |
double precision |
pc_data_type |
integer |
pc_data_type |
numeric |
pc_data_type |
real |
pc_data_type |
text |
pc_data_type |
text[] |
pc_data_type |
timestamp |
pc_data_type |
timestamptz |
pc_col_type |
m |
pc_col_type |
k |
注釈
この操作には認証が必要ありません
post_probe#
コードサンプル
# You can also use wget
curl -X POST https://PEM-SERVER-IP/api/v14/probe/ \
-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/probe/, headers = headers)
print(r.json())
const inputBody = {
"probe_name": "string",
"collection_method": "w",
"enabled": true,
"target_type": 0,
"any_server_version": true,
"any_extension_version": true,
"extension_name": "string",
"interval": 0,
"lifetime": 0,
"discard_history": true,
"platform": "unix",
"probe_code": "string",
"probe_columns": [
{
"pc_name": "string",
"pc_data_type": "bigint",
"pc_unit": "string",
"pc_col_type": "m",
"pc_graphable": true,
"pc_calc_pit": true,
"pc_pit_default": true
}
],
"alternate_code": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
]
};
const headers = {
Content-Type:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/probe/,
{
method: POST,
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /probe/
新しいカスタムプローブを作成します。
ボディパラメーター
{
"probe_name": "string",
"collection_method": "w",
"enabled": true,
"target_type": 0,
"any_server_version": true,
"any_extension_version": true,
"extension_name": "string",
"interval": 0,
"lifetime": 0,
"discard_history": true,
"platform": "unix",
"probe_code": "string",
"probe_columns": [
{
"pc_name": "string",
"pc_data_type": "bigint",
"pc_unit": "string",
"pc_col_type": "m",
"pc_graphable": true,
"pc_calc_pit": true,
"pc_pit_default": true
}
],
"alternate_code": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
]
}
パラメーター#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
X-Auth-Token |
header |
string |
true |
承認トークン |
body |
body |
true |
なし |
応答例
応答#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
ステータス200 |
None |
レスポンススキーマ#
注釈
この操作には認証が必要ありません
get_probe{probe_id}#
コードサンプル
# You can also use wget
curl -X GET https://PEM-SERVER-IP/api/v14/probe/{probe_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/probe/{probe_id}, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/probe/{probe_id},
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /probe/{probe_id}
指定されたプローブIDのプローブ情報を取得します。
パラメーター#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
probe_id |
path |
integer |
true |
プローブ情報が返されるプローブID |
X-Auth-Token |
header |
string |
true |
承認トークン |
応答例
{
"probe_id": 0,
"probe_name": "string",
"enabled": true,
"target_type": 0,
"internal_name": "string",
"is_system_probe": true,
"any_server_version": true,
"collection_method": "w",
"interval": 0,
"lifetime": 0,
"discard_history": true,
"platform": "unix",
"probe_code": "string",
"probe_columns": [
{
"pc_id": 0,
"pc_name": "string",
"pc_data_type": "bigint",
"pc_internal_name": "string",
"pc_unit": "string",
"pc_col_type": "m",
"pc_position": 0,
"pc_graphable": true,
"pc_calc_pit": true,
"pc_pit_default": true
}
],
"alternate_code": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
]
}
応答#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
成功した応答 |
注釈
この操作には認証が必要ありません
put_probe{probe_id}#
コードサンプル
# You can also use wget
curl -X PUT https://PEM-SERVER-IP/api/v14/probe/{probe_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/probe/{probe_id}, headers = headers)
print(r.json())
const inputBody = {
"interval_min": 0,
"interval_sec": 0,
"lifetime": 0,
"enabled": true,
"probe_code": "string",
"probe_columns": {
"changed": [
{
"pc_id": 0,
"pc_unit": "string",
"pc_graphable": true
}
]
},
"alternate_code": {
"changed": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
],
"deleted": [
{
"server_version_id": 0
}
],
"added": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
]
}
};
const headers = {
Content-Type:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/probe/{probe_id},
{
method: PUT,
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PUT /probe/{probe_id}
指定されたプローブIDのカスタム/システムプローブ情報を更新します。
ボディパラメーター
{
"interval_min": 0,
"interval_sec": 0,
"lifetime": 0,
"enabled": true,
"probe_code": "string",
"probe_columns": {
"changed": [
{
"pc_id": 0,
"pc_unit": "string",
"pc_graphable": true
}
]
},
"alternate_code": {
"changed": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
],
"deleted": [
{
"server_version_id": 0
}
],
"added": [
{
"server_version_id": 0,
"server_probe_code": "string",
"extension_version": 0
}
]
}
}
パラメーター#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
probe_id |
path |
integer |
true |
プローブ情報が返されるプローブID |
X-Auth-Token |
header |
string |
true |
承認トークン |
body |
body |
true |
なし |
応答例
応答#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
ステータス200 |
None |
レスポンススキーマ#
注釈
この操作には認証が必要ありません
delete_probe{probe_id}#
コードサンプル
# You can also use wget
curl -X DELETE https://PEM-SERVER-IP/api/v14/probe/{probe_id} \
-H X-Auth-Token: string
import requests
headers = {
X-Auth-Token: string
}
r = requests.delete(https://PEM-SERVER-IP/api/v14/probe/{probe_id}, headers = headers)
print(r.json())
const headers = {
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/api/v14/probe/{probe_id},
{
method: DELETE,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
DELETE /probe/{probe_id}
カスタムプローブを削除します。
パラメーター#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
probe_id |
path |
integer |
true |
プローブ情報が返されるプローブID |
X-Auth-Token |
header |
string |
true |
承認トークン |
応答例
応答#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
削除が成功しました。 |
None |
レスポンススキーマ#
注釈
この操作には認証が必要ありません