---
title: 例: コレクションで実行 (GAD) を使用してサーバーの健全性を監視する
slug: neurons-for-itsm/admin-user-help/jpn/latest/e6KF-gad
createdAt: 2026-10-29T01:28:19.870Z
---

## シナリオ

ある企業には、社内アプリケーションをホストするために使用する運用サーバーが多数あります。 彼らは、 Ivanti サービス マネージャ を使用してこれらのサーバーの健全性を監視したいと考えています。 同社には、サーバーを監視し、最新情報を含む Web 申請を送信できる外部アプリケーションがあります。

コレクションで実行 クイック アクション、Go to Record クイック アクション、および Webhook を活用することで、企業はこのデータを取得して サービス マネージャに記録する方法を簡単に設定できます。

:::hint{type="info"}
この例では、JSON と XML の両方の値が表示されます。
:::

### 前提条件

:::hint{type="info"}
これらの クイック アクションを使用するには、グローバル定数 **EnableActionService&#x20;**&#x3092; **True**に設定します。
:::

この例では、 給与責任者 への管理者レベルのアクセス権があり、ビジネス オブジェクトと クイック アクションの両方の作成に精通していることを前提としています。 If you do not have administrator-level access, see [役割と権限に関する注意事項](https://docs.ivanti.com/neurons-for-itsm/admin-user-help/jpn/latest/mCY--gad#Notes_on_roles_and_permissions) and [グラフィカル アクション デザイナを開く](https://docs.ivanti.com/neurons-for-itsm/admin-user-help/jpn/latest/mCY--gad#To_open_the_Graphical_Action_Designer). また、 給与責任者に&#x306F;**&#x20;Production Server&#x20;**&#x3068;いうビジネス オブジェクトも必要です。

::::ExpandableHeading
## 給与責任者での クイック アクション の設定

2 つの クイック アクションを作成する必要があります: **受信サーバー ステータスの更新** と **移動してサーバー ステータスを更新**。

1. 受**信サーバー ステータスの更新&#x20;**&#x3092;クイック アクション作成するには、 をグラフィカル アクション デザイナ開きます。

:::Paragraph{indent="1"}
参照: [グラフィカル アクション デザイナを開く](https://docs.ivanti.com/neurons-for-itsm/admin-user-help/jpn/latest/mCY--gad#To_open_the_Graphical_Action_Designer)。
:::

:::hint{type="info"}
**ヒント:&#x20;**&#x5FC5;要に応じて クラシック アクション デザイナ を使用することもできます。
:::

2. **保存された値と変数の更新&#x20;**&#x30AF;イック アクションおよび **コレクションで実行**クイック アクション のアクション ブロックをデザイナー ボードにドラッグします。 図のように 2 つのブロックをリンクします。

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/nQM1iAJmPbV2t2dUI8bhk_examplegadrunforcollection2blocks.png" alt="コレクションで実行を使用してサーバーの健全性を監視する例。コレクションで実行にリンクされた変数の更新と保存された値の 2 つのアクション ブロックの作成" position="flex-start" size="69" width="481" height="192" initialPath="../../images/example_GAD_RunforCollection_2_blocks.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_2_blocks.png" showCaption="false" indent="1"}

3. 複合アクション&#x306B;**「受信サーバー ステータスの更新」**&#x3068;いう名前を付けます。
4. **保存された値と変数を更新する&#x20;**&#x30AF;イック アクションブロックを選択します。 このブロックは、アクションで使用される保存された値と変数を更新します。

:::Paragraph{indent="1"}
詳細については、次を参照してください: [保存された値と変数を更新する クイック アクション](https://docs.ivanti.com/neurons-for-itsm/admin-user-help/jpn/latest/vz1NFUaOTh2cqBJBLIzD0)
:::

5. 必要な変数 **WebhookBody**に JSON または XML を保存するようにアクションを構成します。 次のように値を入力します。

| 分野       | 価値            |
| -------- | ------------- |
| 変数タイプ    | 変数            |
| 名前       | ウェブフック本体      |
| データタイプ   | JSON または XML  |
| 値 (JSON) | \{}           |
| 値 (XML)  | \<xml>\</xml> |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/tDaQZ8KuMS22BataHNR5-_examplegotorecordwithwebhook1.png" position="flex-start" size="100" width="710" height="96" initialPath="../../images/example_go_to_record_with_webhook_1.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_go_to_record_with_webhook_1.png" showCaption="false" indent="1"}

6. **コレクションで実行**ブロックを選択し、簡略化された式エディターを使用して式を作成します。 ヘルプについては、次を参照してください: [簡易式エディタの使用](https://docs.ivanti.com/neurons-for-itsm/admin-user-help/jpn/latest/dETlohknYNmY9Dwnqk_9E)

:::Paragraph{indent="1"}
ステップスルーするコレクションは、Webhook に送信された受信データから直接取得されます。 コレクション内のアイテムごとに 1 回、 **「移動してサーバー ステータスを更新」&#x20;**&#x30AF;イック アクション が実行されます。
:::

| 分野                 | パラメータ                      |
| ------------------ | -------------------------- |
| ステップスルーするコレクション    | $(Variable("WebhookBody")) |
| 各アイテムに対して実行するアクション | サーバーステータスに移動して更新する         |
| エラー時に停止            | 選択されていません                  |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/kWJDB3hplW_EG_1pZRI8M_examplegadrunforcollectionblocksettings2.png" alt="サーバー監視例におけるコレクションで実行のブロック設定" position="flex-start" size="43" width="304" height="380" initialPath="../../images/example_GAD_RunforCollection_block_settings2.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_block_settings2.png" showCaption="false" indent="1"}

7. **移動とサーバーステータスの更新**クイック アクションを作成するには、**レコードへ移動&#x20;**&#x30AF;イック アクション と **レコードを更新** クイック アクション のデザイナーボードにブロックをドラッグし、図に示すようにリンクします。

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/nh8OXPM4EKkDPLTb2NNHs_examplegadrunforcollectiongotoandupdateserverstatus.png" alt="移動とサーバーステータスの更新の複合アクション用の 2 つのブロック" position="flex-start" size="100" width="802" height="252" initialPath="../../images/example_GAD_RunforCollection_GoToAndUpdateServerStatus.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_GoToAndUpdateServerStatus.png" showCaption="false" indent="1"}

8. コレクション内のアイテムごとに 1 回、 **Go to Record** クイック アクションを使用して、 **ServerName&#x20;**&#x30D5;ィールドが現在のコレクション アイテムから取得した値と等しいレコードに移動します。 **記録へ移動&#x20;**&#x30D6;ロックを選択し、値を入力します。

| 分野            | 価値                                                        |
| ------------- | --------------------------------------------------------- |
| フィールド名        | サーバー名 (名前)                                                |
| フィールド値 (JSON) | $(JSONPathValue(CurrentCollectionItem(), "$.ServerName")) |
| フィールド値 (XML)  | $(XPathValue(CurrentCollectionItem(), "ServerName"))      |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/gEIB-NQp8MH8OYEkYmBdX_examplegadrunforcollectiongotorecordtopofblocksettings.png" alt="移動とサーバーステータスの更新の複合アクションの一部としてのレコードへの移動のブロック設定の上部" position="flex-start" size="48" width="339" height="509" initialPath="../../images/example_GAD_RunforCollection_GoToRecord_Top_of_BlockSettings.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_GoToRecord_Top_of_BlockSettings.png" showCaption="false" indent="1"}

9. アクションでその名前のレコードが見つからない場合は、「 **新しいレコードを作成** (見つからない場合)」オプションを選択して、現在のコレクション アイテムから名前を取得して新しいレコードを作成します。

| 分野                     | 価値                                                        |
| ---------------------- | --------------------------------------------------------- |
| 見つからない場合は新しいレコードを作成します | 選択済み                                                      |
| フィールド名                 | サーバー名 (名前)                                                |
| フィールド値 (XML)           | $(JSONPathValue(CurrentCollectionItem(), "$.ServerName")) |
| フィールド値 (XML)           | $(XPathValue(CurrentCollectionItem(), "ServerName"))      |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/JVq7MF_8NisSwPXpMUgUg_examplegadrunforcollectiongotorecordbottomofblocksettings.png" alt="存在しない場合に新しいレコードに追加される新しいフィールド" position="flex-start" size="50" width="348" height="509" initialPath="../../images/example_GAD_RunforCollection_GoToRecord_Bottom_of_BlockSettings.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_GoToRecord_Bottom_of_BlockSettings.png" showCaption="false" indent="1"}

10. 最後に、 **LastStatus&#x20;**&#x30C7;ータが現在のコレクション項目から取得され、現在のレコードの対応するフィールドを更新するために使用されます。 **レコードの更新&#x20;**&#x30AF;イック アクションブロックを選択し、値を選択または入力します。

| 分野            | 価値                                                        |
| ------------- | --------------------------------------------------------- |
| フィールド名        | LastStatus (最後の既知のステータス)                                  |
| フィールド値 (JSON) | $(JSONPathValue(CurrentCollectionItem(), "$.LastStatus")) |
| フィールド値 (XML)  | $(XPathValue(CurrentCollectionItem(), "LastStatus"))      |
::::

::::ExpandableHeading
## Webhookを作成する

1. データが適切なエンドポイントに送信されたときに **受信サーバー ステータスの更新** クイック アクション をトリガーする Webhook を作成します。 設**定 メ**ニューで、 ビ**ルド&#x20;**&#x30BB;クションの W**ebhooks マネージャー を**クリックします。

:::Paragraph{indent="1"}
W**ebhooks マネージャー&#x20;**&#x304C;開きます。
:::

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/mJCkdTp4-GYAmfubQy3Zx_creatingwebhook.png" position="flex-start" size="100" width="1691" height="811" initialPath="../../../Webhooks/images/creating_webhook.png" githubPath="Admin-User-Jpn/Content/Configure/Webhooks/images/creating_webhook.png" showCaption="false" indent="1"}

2. W**ebhook の追加を**クリックします。
3. フィールドに情報を入力します:

| 分野            | 価値                                                                            |
| ------------- | ----------------------------------------------------------------------------- |
| 名前            | サーバーステータスの更新                                                                  |
| 説明            | 外部サーバーのステータス情報を給与責任者に送信するためのWebhook                                           |
| エンドポイント拡張     | アップデートサーバーステータス<br />**注:** エンドポイント拡張子では大文字と小文字が区別されます。                       |
| 完全なエンドポイント    | https\://\{tenant url}/api/rest/Webhooks/Execute?extension=UpdateServerStatus |
| ビジネスオブジェクトの選択 | プロダクションサーバー                                                                   |
| アクションを選択      | 受信サーバーステータスの更新 (複合アクション)                                                      |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/63b-AO6ZN_3M2q5GJs3ep_examplegadrunforcollectioncreatewebhook.png" alt="サーバーのステータス更新例用に作成された Webhook" position="flex-start" size="89" width="625" height="495" initialPath="../../images/example_GAD_RunforCollection_Create_Webhook.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_Create_Webhook.png" showCaption="false" indent="1"}

4. **\[保存]**&#x3092;クリックします。

:::Paragraph{indent="1"}
「 **Webhook が正常に作成されました**」という確認メッセージが表示されます。 Webhook がリストに表示され、デフォルトで有効になります。
:::
::::

::::ExpandableHeading
## シナリオを実行する

1. システムに Production Server ビジネス オブジェクトの既存のレコードが 3 つあることを確認します。

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/KRFayB0fEwPYDQP_z9vwy_examplegadrunforcollectiondemolistofrecords.png" alt="新しい複合アクションが実行される前の 3 つのサーバー レコードのリスト" position="flex-start" size="74" width="520" height="260" initialPath="../../images/example_GAD_RunforCollection_demo_listofrecords.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_demo_listofrecords.png" showCaption="false" indent="1"}

2. Postman で、外部アプリケーションから最新のデータをシミュレートして、 給与責任者の **Update Server Status&#x20;**&#x57;ebhook に送信します。

:::Paragraph{indent="1"}
**: : JSON:**
:::

\[

\{

"ServerName": "認証サーバー",

「LastStatus」: 「クラッシュ」

},

\{

"ServerName": "電子メールサーバー",

"LastStatus": "応答なし"

}

\{

"ServerName": "支払いサーバー",

「LastStatus」: 「遅い」

}

\{

"ServerName": "支払いサーバーのレプリカ",

"LastStatus": "開始中"

}

]

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/2z5j2hcvobMY9EjhIlnM7_examplegadrunforcollectiondemopostman.png" alt="サーバーステータスの新しいデータのシミュレーションを表示する Postman" position="flex-start" size="85" width="594" height="472" initialPath="../../images/example_GAD_RunforCollection_demo_postman.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_demo_postman.png" showCaption="false" indent="1"}

:::Paragraph{indent="1"}
**:XML: : :**
:::

\<xml>

\<Server>

\<ServerName>認証サーバー\</ServerName>

\<LastStatus>クラッシュしました\</LastStatus>

\</Server>

\<Server>

\<ServerName>メールサーバー\</ServerName>

\<LastStatus>応答なし\</LastStatus>

\</Server>

\<Server>

\<ServerName>支払いサーバー\</ServerName>

\<LastStatus>遅い\</LastStatus>

\</Server>

\<Server>

\<ServerName>支払いサーバーレプリカ\</ServerName>

\<LastStatus>開始します\</LastStatus>

\</Server>

\</xml>

:::Paragraph{indent="1"}
各項目に対して、 **「レコードへ移動」**&#x30AF;イック アクション および **「受信サーバー ステータスの更新」** 複合アクションが実行されます。 現在のサーバー ステータス データには、 **CurrentCollectionItem()** 式関数を使用してアクセスします。
:::

:::Paragraph{indent="1"}
最後のケースでは、まだレコードは存在していませんが、 **レコードに移動**クイック アクション によってレコードが作成されるように構成されています。
:::

3. Postman で、\[ **送信&#x20;**] をクリックし、\[**&#x20;ステータス 200 OK**] を確認します。
4. 給与責任者に戻って、**&#x20;更新**を実行します。

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/tgiU-DP_mpz3uPUH_zKx4_examplegadrunforcollectiondemolistofrecordsafter.png" alt="アクションが実行され、新しく作成されたレコードが表示される更新されたサーバー レコードのリスト" position="flex-start" size="79" width="554" height="294" initialPath="../../images/example_GAD_RunforCollection_demo_listofrecords_after.png" githubPath="Admin-User-Jpn/Content/Configure/QuickActions/images/example_GAD_RunforCollection_demo_listofrecords_after.png" showCaption="false" indent="1"}

:::Paragraph{indent="1"}
既存のすべてのレコードは、サーバー名ごとに、対応する最新のステータスで更新されます。 「欠落している」4 番目のレコードも、提供されたデータを使用して作成されます。
:::
::::
