Administration
Also available as:
PDF
loading table of contents...

HTTP Notification Service

The second Notifier is to send HTTP POST requests and the implementation is org.apache.nifi.bootstrap.notification.http.HttpNotificationService. It has the following properties available:

Property

Required

Description

URL

true

The URL to send the notification to. Expression language is supported.

Connection timeout

Max wait time for connection to remote service. Expression language is supported. This defaults to 10s.

Write timeout

Max wait time for remote service to read the request sent. Expression language is supported. This defaults to 10s.

Truststore Filename

The fully-qualified filename of the Truststore

Truststore Type

The Type of the Truststore. Either JKS or PKCS12

Truststore Password

The password for the Truststore

Keystore Filename

The fully-qualified filename of the Keystore

Keystore Type

The password for the Keystore

Keystore Password

The password for the key. If this is not specified, but the Keystore Filename, Password, and Type are specified, then the Keystore Password will be assumed to be the same as the Key Password.

SSL Protocol

The algorithm to use for this SSL context. This can either be "SSL" or "TLS".

In addition to the properties above, dynamic properties can be added. They will be added as headers to the HTTP request. Expression language is supported.

The notification message is in the body of the POST request. The type of notification is in the header "notification.type" and the subject uses the header "notification.subject".

A complete example of configuring the HTTP service could look like the following:

     <service>
        <id>http-notification</id>
        <class>org.apache.nifi.bootstrap.notification.http.HttpNotificationService</class>
        <property name="URL">https://testServer.com:8080/</property>
        <property name="Truststore Filename">localhost-ts.jks</property>
        <property name="Truststore Type">JKS</property>
        <property name="Truststore Password">localtest<property>
        <property name="Keystore Filename">localhost-ts.jks</property>
        <property name="Keystore Type">JKS</property>
        <property name="Keystore Password">localtest</property>
        <property name="notification.timestamp">${now()}</property>
     </service>