---
title: Example: Monitoring Server Health Using Run for Collection (GAD)
slug: neurons-for-itsm/admin-user-help/enu/latest/example-monitoring-server-health-using-run-for-collection-gad
createdAt: 2026-07-14T19:16:36.637Z
---

## Scenario

A company has a number of production servers which they use to host their internal applications. They want to use Ivanti Neurons for ITSM to monitor the health of these servers. The company has an external application which monitors the servers and can send a web request containing the latest information.

By leveraging the Run for Collection Quick Action, Go to Record Quick Action, and webhooks, the company can easily set up a way to take this data and record it in Neurons for ITSM.

:::hint{type="info"}
Values are shown in this example for both JSON and XML.
:::

### Prerequisites

:::hint{type="info"}
To use these Quick Actions, set the global constant **EnableActionService&#x20;**&#x74;o **True**.
:::

This example assumes you have administrator-level access to ITSM and are familiar with creating both business objects and Quick Actions. If you do not have administrator-level access, see [Notes on roles and permissions](docId:2Wq6ihUN2zxiR21eA3M7g) and [Open the Graphical Action Designer](docId:2Wq6ihUN2zxiR21eA3M7g). You also need a business object called **Production Server** in ITSM.

::::ExpandableHeading
## Setting up Quick Actions in ITSM

Two Quick Actions need to be created: **Incoming Server Status Update** and **Go To and Update Server Status**.

1. To create the **Incoming Server Status Update** Quick Action, open the Graphical Action Designer.

:::Paragraph{indent="1"}
See: [Open the Graphical Action Designer](docId:2Wq6ihUN2zxiR21eA3M7g).
:::

:::hint{type="info"}
**Tip:&#x20;**&#x59;ou can use the Classic Action Designer if you prefer.
:::

2. Drag action blocks on to the Designer Board for the **Update Stored Values and Variables** Quick Action and the **Run for Collection&#x20;**&#x51;uick Action. Link the two blocks as shown.

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/LvKGsqJ_7aNiCxwTe-fPn_examplegadrunforcollection2blocks.png" alt="Example for monitoring server health using Run for Collection; creation of 2 action blocks for Update Variables and Stored Values linked to Run for Collection" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_2_blocks.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_2_blocks.png" showCaption="false" width="481" height="192" darkWidth="481" darkHeight="192" indent="1"}

3. Name the Composite Action as **Incoming Server Status Update**.
4. Select the **Update Stored Values and Variables** Quick Action block. This block updates the stored values and variables used in your action.

:::Paragraph{indent="1"}
For more help see: [Update Stored Values and Variables Quick Action](docId\:DofJmmkz8_OmkTCcL485K)
:::

5. Configure the action to store the JSON or XML in the required variable **WebhookBody**. Enter the values as follows:

| Field         | Value         |
| ------------- | ------------- |
| Variable Type | Variable      |
| Name          | WebhookBody   |
| Data Type     | JSON or XML   |
| Value (JSON)  | \{}           |
| Value (XML)   | \<xml>\</xml> |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/G4UcWirIU3NHK-O414t1z_examplegotorecordwithwebhook1.png" position="flex-start" size="40" initialPath="../../quick-actions-images/example_go_to_record_with_webhook_1.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_go_to_record_with_webhook_1.png" showCaption="false" width="710" height="96" darkWidth="710" darkHeight="96" indent="1"}

6. Select the **Run for Collection** block and then create an expression using the Simplified Expression Editor. For help, see: [Using the Simplified Expression Editor](docId\:AYcVgwQ-XAxop0oFPGL9H)

:::Paragraph{indent="1"}
The collection to step through is taken directly from the incoming data sent to the webhook. Once per item in the collection, the **Go To and Update Server Status&#x20;**&#x51;uick Action is run.
:::

| Field                       | Parameter                      |
| --------------------------- | ------------------------------ |
| Collection to step through  | $(Variable("WebhookBody"))     |
| Action to Run for each item | Go To and Update Server Status |
| Stop on Error               | Not selected                   |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/VrPCewaqbIB_P1zCPAraL_examplegadrunforcollectionblocksettings2.png" alt="Block settings for Run for Collection in server monitoring example" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_block_settings2.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_block_settings2.png" showCaption="false" width="304" height="380" darkWidth="304" darkHeight="380" indent="1"}

7. To create the **Go To and Update Server Status&#x20;**&#x51;uick Action, drag blocks on to the Designer Board for the **Go to Record&#x20;**&#x51;uick Action and **Update a Record** Quick Action and link together as shown.

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/RG7Pk9twFTkTAyVN_7z-Q_examplegadrunforcollectiongotoandupdateserverstatus.png" alt="2 blocks for Go To and Update Server Status composite action" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_GoToAndUpdateServerStatus.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_GoToAndUpdateServerStatus.png" showCaption="false" width="802" height="252" darkWidth="802" darkHeight="252" indent="1"}

8. Once per item in the collection, the **Go to Record** Quick Action, is used to go to a record where the **ServerName&#x20;**&#x66;ield is equal to the value taken from the current collection item. Select th&#x65;**&#x20;Go to Record** block and enter the values:

| Field              | Value                                                     |
| ------------------ | --------------------------------------------------------- |
| Field Name         | ServerName (Name)                                         |
| Field Value (JSON) | $(JSONPathValue(CurrentCollectionItem(), "$.ServerName")) |
| Field Value (XML)  | $(XPathValue(CurrentCollectionItem(), "ServerName"))      |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/TLbB4XaSp1jNXOta_pAjp_examplegadrunforcollectiongotorecordtopofblocksettings.png" alt="Top of Block settings for Go to Record as part of Go To and Update server Status Composite Action" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_GoToRecord_Top_of_BlockSettings.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_GoToRecord_Top_of_BlockSettings.png" showCaption="false" width="339" height="509" darkWidth="339" darkHeight="509" indent="1"}

9. If the action doesn't find a record with that name, select the **Create a new Record** if not found option to create a new record, again taking the name from the current collection item.

| Field                            | Value                                                     |
| -------------------------------- | --------------------------------------------------------- |
| Create a new Record if not found | Selected                                                  |
| Field Name                       | ServerName (Name)                                         |
| Field Value (XML)                | $(JSONPathValue(CurrentCollectionItem(), "$.ServerName")) |
| Field Value (XML)                | $(XPathValue(CurrentCollectionItem(), "ServerName"))      |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/Mvnillu6FpKN6_IyB29uK_examplegadrunforcollectiongotorecordbottomofblocksettings.png" alt="New fields that go in new record if one is not present" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_GoToRecord_Bottom_of_BlockSettings.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_GoToRecord_Bottom_of_BlockSettings.png" showCaption="false" width="348" height="509" darkWidth="348" darkHeight="509" indent="1"}

10. Finally, the **LastStatus&#x20;**&#x64;ata is taken out of the current collection item, and used to update the corresponding field on the current record. Select th&#x65;**&#x20;Update a Record** Quick Action block and select or enter the values:

| Field              | Value                                                     |
| ------------------ | --------------------------------------------------------- |
| Field Name         | LastStatus (Last Known Status)                            |
| Field Value (JSON) | $(JSONPathValue(CurrentCollectionItem(), "$.LastStatus")) |
| Field Value (XML)  | $(XPathValue(CurrentCollectionItem(), "LastStatus"))      |
::::

::::ExpandableHeading
## Create the Webhook

1. Create a webhook to trigger the **Incoming Server Status Update** Quick Action when data is sent to the appropriate endpoint. In the **Settings&#x20;**&#x6D;enu, click on **Webhooks Manager** in the **Build&#x20;**&#x73;ection.

:::Paragraph{indent="1"}
The **Webhooks Manager** opens.
:::

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/0YWP5EdRGlpA7Lh8oi5l0_creatingwebhook.png" position="flex-start" size="40" initialPath="../../../Webhooks/images/creating_webhook.png" githubPath="Content/Configure/Webhooks/images/creating_webhook.png" showCaption="false" width="1101" height="341" darkWidth="1101" darkHeight="341" indent="1"}

2. Click **Add a Webhook**.
3. Enter information into the fields:

| Field                  | Value                                                                         |
| ---------------------- | ----------------------------------------------------------------------------- |
| Name                   | Update Server Status                                                          |
| Description            | Webhook for sending external server status info to ITSM                       |
| Endpoint Extension     | UpdateServerStatus<br />**Note:** The endpoint extension is case-sensitive.   |
| Full Endpoint          | https\://\{tenant url}/api/rest/Webhooks/Execute?extension=UpdateServerStatus |
| Select Business Object | ProductionServer                                                              |
| Select Action          | Incoming Server Status Update (Composite Action)                              |

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/gvCEXziOIlM8RNLpMrUD0_examplegadrunforcollectioncreatewebhook.png" alt="Webhook created for the update server status example" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_Create_Webhook.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_Create_Webhook.png" showCaption="false" width="625" height="495" darkWidth="625" darkHeight="495" indent="1"}

4. Click **Save**.

:::Paragraph{indent="1"}
A confirmation message appears saying **Webhook successfully created**. Your webhook appears in the list and is enabled by default.
:::
::::

::::ExpandableHeading
## Run the Scenario

1. Ensure you have three existing records in the system for the Production Server business object:

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/-w8WfEhUjx-kzvdFEl7Nm_examplegadrunforcollectiondemolistofrecords.png" alt="List of 3 server records prior to new composite action being run" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_demo_listofrecords.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_demo_listofrecords.png" showCaption="false" width="520" height="260" darkWidth="520" darkHeight="260" indent="1"}

2. In Postman, simulate the latest data coming from the external application to send to the **Update Server Status&#x20;**&#x77;ebhook in ITSM:

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

\[

\{

"ServerName": "Authentication Server",

"LastStatus": "Crashed"

},

\{

"ServerName": "Email Server",

"LastStatus": "Unresponsive"

}

\{

"ServerName": "Payments Server",

"LastStatus": "Slow"

}

\{

"ServerName": "Payments Server Replica",

"LastStatus": "Starting"

}

]

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/NDG0UZT1xu3CvQv9kNirK_examplegadrunforcollectiondemopostman.png" alt="Postman showing simulation of new data for server statuses" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_demo_postman.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_demo_postman.png" showCaption="false" width="594" height="472" darkWidth="594" darkHeight="472" indent="1"}

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

\<xml>

\<Server>

\<ServerName>Authentication Server\</ServerName>

\<LastStatus>Crashed\</LastStatus>

\</Server>

\<Server>

\<ServerName>Email Server\</ServerName>

\<LastStatus>Unresponsive\</LastStatus>

\</Server>

\<Server>

\<ServerName>Payments Server\</ServerName>

\<LastStatus>Slow\</LastStatus>

\</Server>

\<Server>

\<ServerName>Payments Server Replica\</ServerName>

\<LastStatus>Starting\</LastStatus>

\</Server>

\</xml>

:::Paragraph{indent="1"}
For each item, the **Go to Record**Quick Action and **Incoming Server Status Update** composite action are run. The current server status data is accessed using the **CurrentCollectionItem()** expression function.
:::

:::Paragraph{indent="1"}
For the last case, there is no record existing as yet but the **Go to Record**Quick Action was configured to create one.
:::

3. In Postman, click **Send&#x20;**&#x61;nd check fo&#x72;**&#x20;status 200 OK**.
4. Go back to ITSM and do a **Refresh**.

::Image[]{src="https://api.archbee.com/api/optimize/parib0MC3hVoUNdfQdnac/Dmpp4fU3bTHXWpbJemOBT_examplegadrunforcollectiondemolistofrecordsafter.png" alt="List of updated server records post action being executed and showing newly created record" position="flex-start" size="40" initialPath="../../quick-actions-images/example_GAD_RunforCollection_demo_listofrecords_after.png" githubPath="Content/Configure/QuickActions/quick-actions-images/example_GAD_RunforCollection_demo_listofrecords_after.png" showCaption="false" width="554" height="294" darkWidth="554" darkHeight="294" indent="1"}

:::Paragraph{indent="1"}
Every existing record is updated with the corresponding latest status, by server name. The "missing" fourth record is also created using the data as supplied.
:::
::::
