Creating webhook notifications

Procedure

  1. In the Notifications dialog box, click the Webhooks tab, and then click  New.

  2. Enter a name for the webhook notification and, optionally, its description.

  3. From the Category drop-down menu, select one or more categories. To include all categories, click Select All. For a description of categories, see “Viewing events”.

  4. From the Status drop-down menu, select one or more statuses. To include all statuses, click Select All. For a description of statuses, see “Viewing events”.

  5. In the Post URL field, enter the URL of the endpoint the webhook notifications should be sent to in one of the following formats:

    https://<Host>
    https://<Host>/<Path>

    For details on the format of the data that HYCU for Google Cloud sends to the specified URL, see “Webhook data format”.

  6. Only if the receiving endpoint requires sender's identification. From the Authentication type drop-down menu, select one of the following authentication types:

    • Authentication by secret, and then enter the secret to connect to your webhook endpoint.
    • Basic authentication, and then enter the user name and password associated with your webhook endpoint.
  7. Click Next.
  8. Optional. Customize the body of the request that is sent by HYCU for Google Cloud. You can click the appropriate fields in the HYCU fields list to easily insert event variables into the body.

    i Important  Make sure the format you define in the body is supported by the platform to which webhook notifications will be sent.

  9. Click Save.

Your changes take effect immediately and webhook notifications are sent to any URL that you specified in the notification settings.

You can later edit settings for existing webhook notifications (click  Edit and make the required modifications) or delete the ones that you do not need anymore (click  Delete).

Webhook data format

The webhook data format is defined by:

  • HTTP request header sent by HYCU for Google Cloud
  • HTTP request body sent by HYCU for Google Cloud
  • HTTP response code sent by the webhook endpoint and received by HYCU for Google Cloud

HTTP request headers

The request headers are sent in the following format:

content-type = application/json

x-hycu-signature = base64(hmac(body, secret, 'sha256'))

n Note  The x-hycu-signature request header is sent only if the webhook secret is specified.

HTTP request body

The request body is sent in the following format:

{

"severity": "<severity-value>",

"created": "<created-value>",

"details": "<details-value>",

"category": "<category-value>",

"message": "<message-value>",

"user": "<user-value>",

"taskId": "<taskId-value>"

}

n Note  Null values are ignored.

HTTP response code

Your webhook URL should return a response with HTTP status code 204.