Configuring the webhook v2 transport

The webhook v2 transport allows the probe to connect to a specified resource server and subscribe to receive events.

The transport also enables the probe to create a callback URL to which the target server or an HTTP client can send notifications using POST or GET requests.

Note: There are currently two webhook probe transports. For details of the differences between the two types, see Webhook probe transport types so that you can chose the most appropriate one for your environment.

Webhook v2 transport properties

The following table describes the properties in the restWebhookTransportV2.properties file.

Note: When using the Web Hook transport, you must specify values for the Host and Port properties in the message_bus.props file.
Table 1. Properties in the restWebhookTransportV2.properties file

Property name

Description

webhookURI

Use this property to specify the path of the Web Hook URI on the local server into which the target device will POST notifications.

This property can be set to a URL to specify the scheme (HTTP or HTTPS), port number, and path, for example:

webhookURI=/probe/webhook

or

webhookURI=http://hostname:80/probe/webhook

If only the path is specified, the HTTP(s) server will bind to the local port number specified in the Port property of the message_bus.props file. Make sure the local port is free.

If unset or empty, the probe will generate a path.

By default this property is set to OFF (the HTTP server is disabled).

respondWithContent

Use this property to specify whether the probe includes the HTTP body received from the client HTTP request in the HTTP response. Set this property to ON to configure probe webhook to include the HTTP body. If set to OFF_WITH_HTTP_200, the probe will respond with 200 (OK) for a successful request without a body in the response.

The default is OFF and the probe will respond with 204 (No Content) response code.

validateBodySyntax

Use this property to specify that the probe performs a JSON and XML syntax format check on the HTTP request body.

The default is ON.

validateRequestURI

Use this property to specify whether the probe checks the URI paths. Set this property to ON to enable URI path check. Setting this property to OFF disables the URI check and the webhook will accept all HTTP request regardless of the path set.

The default is ON.

idleTimeout

Use this property to specify the time (in seconds) that the webhook allows an idle HTTP connection to remain open before it is closed.

If set to 0, then no timeout is applied and the HTTP server will keep all connections.

The default is 180.

basicAuthenticationUsername

Use this property to specify the basic authentication username that the probe should use in the authentication header to gain access to the target device.

basicAuthenticationPassword

Use this property to specify the password associated with the basic authentication username that the probe should use in the authentication header.

httpConnectionPropertiesFile

Use this property to specify the JSON file containing REST connection properties.

The default is $OMNIHOME/java/conf/restMultiChannelHttpTransport.json.

The following is an example of a restWebhookTransportV2.properties file:
# Example Webhook Properties file
#webhookURI=OFF
#respondWithContent=OFF
#validateBodySyntax=ON
#validateRequestURI=ON
#idleTimeout=180
#serverBasicAuthenticationUsername=
#serverBasicAuthenticationPassword=
#httpConnectionPropertiesFile=$OMNIHOME/java/conf/restMultiChannelHttpTransport.json