The Event Analytics grid extension has several management pages:
Session Rules page
Session Facts page
The Main management page for Event Analytics contains the following sections:
Sessions - create, start, stop, manage, and remove sessions
Menu - link to Subscriptions page for Event Analytics
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.
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.
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.
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.
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).
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.
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.
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.
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.
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.
In the Session Facts page you can view inserted fact objects for a started session in real time. This page shows the following data:
Type - "Java" for Java objects or "Declared" for declared fact objects.
Class name - Java class name or the name of the declared fact type.
Object - A string representation of the object as given by the method toString(). If the type is Declared a built-in toString() method is used.
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.