XenApp and XenDesktop are equipped with Proactive Notifications and Alerting enabling an administrator to configure alert policies. Whenever a monitored parameter goes beyond the configured warning or critical thresholds, an alert/alarm is triggered. The notification can be seen on the Director console. In addition, you can subscribe via email when notifications are generated. Take this one step further by integrating the notifications into custom applications. This enables several use cases such as:

  • Integrating the Director notification with an incident resolution platform and track the issue through resolution
  • Sending a customized SMS to a group of people when an alert is generated
  • Diming the light of the IT bay when a major alert is generated on your deployment
  • Running a custom script on the controller when a specific kind of alert is generated, and resolving it automatically

In XenApp and XenDesktop 7.9, webhooks are integrated into alerting. Using webhooks, you can extend, customize and integrate the Director notifications into custom applications or with applications around the web.

One of the major uses of webhooks is integration with Octoblu, an IoT messaging and automation platform from Citrix.  With OctoBlu, you can achieve all of the above use cases and even more.

Note: This post describes an experimental integration between Citrix Director and Octoblu. This integration should not be deployed for production environments.


In XenApp and XenDesktop, you can configure policies and conditions using the POSH cmdlets. With XenApp and XenDesktop 7.9 we are extending the POSH cmdlets so that now a webhook can be configured on an alert policy using the POSH cmdlets. With webhooks, you can define a HTTP callback, a HTTP POST that occurs when a notification is generated on Director.

#Create a New Policy

$policy = New-MonitorNotificationPolicy –Name “My Test policy” -Description “Policy Created with Webhooks” –Enabled $true -Webhook <Webhook URL>

Conditions and targets can be added to the alert policy. A webhook can be added to an existing alert policy as well.

#Editing an existing Policy

Set-MonitorNotificationPolicy – Uid 5 –Webhook <Webhook URL>

The POSH cmdlets New-MonitorNotificationPolicy and Set-MonitorNotificationPolicy can be found under Citrix.Monitor.*

*Note – Webhooks can be configured only through POSH cmdlets. Alert policies which are configured through UI can be edited through POSH cmdlets.

Payload Format

If a webhook is configured on an alert policy, all the notifications generated from the policy will trigger the webhook by making a POST call to the webhook URL. The POST message will have all the information about the notification in JSON format. The sample POST message is as shown below: 

{“NotificationId” : <Notification Id>,

“Target” : <Notification Target Id>,

“Condition” : <Condition which was violated>,

“Value” : <The threshold value for the Condition>,

“Timestamp”: <The time in UTC at which the notification was generated>,

“PolicyName”: <The name of the Alert policy>,

“Description”: <The description of the alert policy>,

“Scope” : <The scope of the alert policy>,

“NotificationState”: <The state of the Notification critical\warning\healthy\dismissed>,

“Site” : <The name of the Site>} 

Note: The POST call is made from the Monitoring service running on the Delivery Controller.


Octoblu is a full-stack Internet of Things messaging and automation platform that enables companies to create IoT services with secure real-time exchange of data.

Integrating Director notifications with Octoblu opens up a wide variety of solutions for managing the notifications. Some examples are:

  1. Send SMS notification, when a notification is generated on Director.
  2. Director alerts can be integrated to custom incident resolution platforms which help in tracking, managing notifications.
  3. The notifications can be integrated with smart devices such as IoT bulbs.

Integration with Octoblu

A simple workflow is designed on Octoblu as shown below. The workflow, when triggered sends an SMS to the configured numbers. The POST URL is configured as the webhook URL in the alert policy. When a notification is triggered, the webhook will be invoked. The POST message will contain the details about the notifications, which can be sent as the SMS.


Learn more about designing and managing Octoblu workflows.

Citrix Mobilize Windows Banner 1_728x90-061715