Event Analytics Management Pages

The Event Analytics grid extension has several management pages:

Main Page

The Main management page for Event Analytics contains the following sections:

Screen capture: Event Analytics main page

When starting Event Analytics for the first time a session named "Default" is automatically created. To create a new session, press + Create... and enter a name for the session. The name can only contain letters, numeric characters, hyphen, and the underscore character. The name must be unique (not case sensitive) and be at least one character long. A directory with the session name is automatically created in the analytics home directory (as defined by the application property eventhub.analytics.directory).

Press the start ("play") button to start the session and the stop button to stop the session.

Screen capture: Start session

If there is an error in a Drools Rules Language (drl) file for the session, the session cannot be started and gets an error state. You can use the ERRORS link to view the errors.

Screen capture: Session errors

To remove a session, the session must be stopped. When pressing the X (remove) button you get a confirmation dialog with an option to permanently delete all session files, that is, the complete session directory. If you do not select the checkbox, the session directory and its contents will not be deleted, only the session property will be removed. If desired you can create a new session with the same name at a later stage to restore the session set up, including persisted fact objects for the session. If the checkbox is selected, the session directory and all its files and subdirectories will be permanently deleted.

Screen capture: Remove Session confirmation dialog box

Press the Rules button to manage Drools Rules Language (drl) files for the session in the Session Rules page.

Press the Facts button to view fact objects for the session in real time in the Session Facts page.

Event Analytics Subscription Page

In the Event Analytics Subscriptions page you can view all subscriptions for the Event Analytics subscriber. Subscriptions are defined separately for every session and merged into the subscriptions. These subscriptions are sent to the Event Hub, that does not know anything about Event Analytics sessions. Event Analytics is just another subscriber to the Event Hub.

The Event Analytics Subscriptions page shows the Publisher, Document Name, Operations, and Priority (the subscriber is always "EventAnalytics"). You can filter the table on all columns in the same way as in the Event Hub Subscriptions page (no publisher view).

Screen capture: Event Analytics Subscriptions page

Session Rules Page

In the Session Rules page you can create, upload, edit, and remove resources for a session. A resource is a Drools Rules Language (drl) file.

Screen capture: Session Test Rules page for a started session

To create a new resource, press + Create... and enter a name for the resource. The name can only contain letters, numeric characters, hyphen, and the underscore character. The name must be unique (not case sensitive) within the session and be at least one character long. A demo drl file with the resource name is automatically created in the session directory. If the drl file already exists, the demo drl file will not be created.

You can edit the drl file in a simple editor by pressing the Edit button. Press Ctrl+F in the editor window to find a string in the file.

Note: Ctrl+S will not save the drl file, you must press the Save button (in upper left corner) to save any changes you have done in the editor. If you close the window or refresh the page, all changes will also be lost.
Note: Open a drl file in the editor page and save it to create Carriage Return / Linefeeds (\r\n) and get correct line numbers in knowledge builder error messages.
Screen capture: Drools Rules Language (drl) editor page

You can upload a drl file by pressing the Upload button. The existing drl file will be replaced by the uploaded file. Press the active checkbox icon to enable or disable the resource.

Screen capture: Remove Resource confirmation dialog box

If the session is started you also see the sections Rules and Subscriptions. In the Rules section you can view the package and name for all rules for the session. You can reload the session in runtime by pressing the Reload button. No events are lost, a new knowledge session is created with the same state as the old one and the old session is replaced. If Event Analytics receives events from the Event Hub while reloading a session, some events will be handled by the old knowledge session. If there is an error in a drl file, the session cannot be reloaded and the old knowledge session will continue to run. You will get to a Reload Result page where the Drools knowledge builder errors are shown. You can also use the ERRORS link to view the errors at a later stage.

Screen capture: Reload Result page with errors Screen capture: Reload Result page without errors
Note: When creating a session the directory "lib" is created in the session directory. You can put your own jar files into the lib directory and they will be loaded by a custom class loader when starting or reloading a session. If you store an object of a class, defined in a jar file, in the knowledge session you can never remove that class since the persisted object then cannot be deserialized from persistence (since the class is no longer in the classpath).

In the Subscriptions section in the Session Rules page you can view all subscriptions for the session. Subscriptions are defined separately for every resource (drl file) and merged into the subscriptions. These subscriptions are in turn merged into subscriptions for the Event Analytics subscriber as found in the Event Analytics Subscriptions page.

The Session Rules Subscriptions show the Publisher, Document Name, Operations, and Priority. You can filter the table on all columns in the same way as in the Event Analytics Subscriptions page.

Session Facts Page

In the Session Facts page you can view inserted fact objects for a started session in real time. This page shows the following data:

By refreshing this page you can, for example, watch counter values in real time.

You can filter the table on all columns. If the Reload Page checkbox is selected, you will reload the fact objects for the session when you filter the table. If the Reload Page checkbox is not selected, you can filter the table without reloading the fact objects. Hence, you can filter data on a specific snapshot.

Screen capture: Session Test Facts page