Webhook for Alert Notifications

You can use webhooks to send Citrix Analytics alert notifications to any third-party applications that have incoming webhook URLs configured. Webhooks are HTTP callbacks that enable real-time messaging between the service provider applications and consumer applications. Since the alert notifications are sent in real time, you get notified when the events occur.

When Citrix Analytics triggers an alert, the associated webhook sends the alert message to the URL of the target application. The alert is sent in the form of a JSON payload through the HTTP POST or PUT request. For example, when a user triggers a risk indicator or the performance of a VDI machine goes down, you can set up a webhook to send the alert notifications to your Slack channel. Setting up webhooks for alert management helps you to get real-time notifications in your applications. You can take timely actions to mitigate the security risk or improve the performance of your Citrix Virtual Apps and Desktops deployment.

Create Webhook Profile

To create the webhook profiles on Citrix Analytics:

  1. Sign in to Citrix Analytics.
  2. Depending on your subscribed offering, click Manage to access Security Analytics or Performance Analytics.
  3. From the top bar, click Settings > Alert Settings > Webhook.
  4. Select Create Webhook. Create Webhook profile
  5. Enter a profile name and a description of the webhook to identify its purpose.
  6. Select the HTTP method and the webhook URL of your application to send the alert message.

    Note: Usually the outgoing webhooks are sent through the HTTP POST request. You can also include an authentication token in the webhook URL of your application.

  7. Enter the message about the alert that you want to send to the webhook URL. The message must be structured in the formats such as JSON or XML as defined by the target application. For more information, see the Webhook examples.
  8. (Optional) Enter the header keys and values for the message. The header can include authentication tokens or other custom key-value pairs to securely send the payload to your application.
  9. To validate the webhook configuration, click Test. The test validates the outgoing webhook URL, the payload structure, and the header keys. If no issues are found in your configuration, you get the “Test successful” message.

Webhook Configuration Examples

The section provides examples of configuring webhooks to send alerts to third-party applications such as Slack and Microsoft Teams.

Note: Refer to the product documentation of the third-party applications on how to get the webhook URL and the required configurations for the webhook.

Sending alert message to Slack

On Slack, ensure that you have completed the following tasks before sending an alert:

  1. Create a Slack app for Citrix Analytics if you don’t have already one.
  2. For the app, enable the Incoming Webhook feature and create an incoming Webhook.
  3. Select a channel to which the app posts the message.
  4. When you authorize the app, you get the Webhook URL for sending the message. For information, see Getting started with Incoming Webhooks.

Sample message format

curl --location --request POST 'WEBHOOK URL' --header 'Content-Type: application/json' --data-raw '{"text": "Test Citrix Analytics Alert."}

Output

Sample Alert message in Slack

Sending alert message to Microsoft Teams

On Microsoft Teams, ensure that you have completed the following tasks before sending an alert:

  1. Create a Teams group within Teams if you don’t have already one.
  2. Create a Webhook connecter. Refer to the steps described in the Create and send messages article.
  3. Get the URL for the webhook.

Sample message format

curl --location --request POST 'WEBHOOK URL' --header 'Content-Type: application/json' --data-raw '{"text": "Test Citrix Analytics Alert."}

Output

Sample Alert message in Teams

Webhook for Alert Notifications