Connection Oriented Subscription

Connection-oriented notifications, using websockets

Supported notification types:

  • Inventory notifications [Create, Update, Delete]
  • Alarm notifications

The following is the workflow in the case of "connection-oriented" notifications:

  • The client subscribes to a predefined URL using a websocket client through a secure HTTPS channel.

    • URL: https://< server>:30603/crosswork/notifcation/restconf/streams/v{}/{notification-type}{.xml | .json}
      • where {notification-type} can be either "inventory" or "alarm"
      • and appending the url with ".xml" will result in notifications serialized to xml format and ".json" will result in notifications serialized to json
    • Authentication: Basic auth or JWT
  • If the client has provided all required information and if the provided user passes the authorization phase, a secure connection channel is established between the Crosswork server and the client.

  • Each subscription must be unique. Subscription uniqueness is determined by the following combinations: sourceip + notification-type + filter

    • sourceip: ipaddress of the subscriber
    • notification-type: type of notification ("inventory" or "alarm")
    • filter: filter to the incoming notification

    A sample client can be downloaded here.

Run the Connection-Oriented Notification Client

Before you begin, be sure you know:

  • The fully qualified DNS domain name or IP address of the Crosswork server whose notifications you want the client to receive.
  • The user ID and password for a Crosswork user with role having All API permission(read, write and delete) of RESTCONF Notification Subscription on that server.
  • Any filters you want to apply to the incoming notifications must follow this format: FILTER_TYPE=FILTERVALUE. Enter the filter without quotes. Spaces are OK between key/value pairs, but use commas to separate multiple values for the same key..
  • Filters supported:
    • Alarm : productType, productFamily, severity and deviceUUId
    • Inventory : productType and productFamily

Note: Filters are combined using an AND condition. While a single filter can be used to receive specific notifications, when multiple filters are configured, the notification is forwarded only if every filter condition is met. Multiple value for a specific filter will be treated in OR condition.

For example:

  • On Alarm notification: productType=Cisco ASR 4000,Cisco 9800&productFamily=Routers,Switches and Hubs&severity=major&deviceUUId=ea3pn47123424

  • On Inventory notification: productType=Cisco ASR 4000,Cisco 9800&productFamily=Routers

The client will record only the notifications passing the filter.

  1. Run the command: java -jar nbi-notifications-connection-oriented-client.jar
  2. Answer the prompts by entering values.

Once you press Enter on the filters prompt, and if the credentials are correct and your filter is valid, the client will start listening for notifications. The client will record the notifications in a log file named “restconf-notifications” in the same directory where the JAR file is stored.