This section contains the typical application tasks you can perform with Oracle CEP Visualizer.
Visualizer is fairly self-explanatory and intuitive, so not all tasks are discussed here, but rather, just those that are most common and typical and from which other similar tasks can be deduced.
This section describes how to:
You can use Visualizer to monitor the entry and exit points of a stage, or a specified path, of the event processing network (EPN) of an application. Oracle CEP defines the following metrics that you can monitor for each stage or path:
The Visualizer monitoring feature is itself implement as an Oracle CEP application; this means that the diagnostic information can be viewed as an event, and the application uses EPL rules to process these diagnostic events.
To use Visualizer to monitor a stage or path of the EPN, you must first create a diagnostic profile, as described in the following steps:
Max Latency Metric
—Specifies that you want to monitor the maximum amount of time it takes for events to flow through a stage or a subset of the event processing network (path).Average Latency Metric
—Specifies that you want to monitor the average amount of time it takes for events to flow through a stage or a subset of the event processing network (path).Threshold
—Specifies threshold for the average latency monitoring. This value is enabled only if you specify Average Latency Metric.Time Unit
—Specifies the time units for the threshhold and average interval fields.Average Interval
—Specifies the time interval for which you want to gather diagnostic data.Update the Path Information section as follows:
Average Throughput Metric
—Specifies that you want to monitor the average throughput of events flowing through the stage.Time Unit
—Specifies the time units for the average interval fields.Throughput Interval
—Specifies the time interval for which you want to gather metrics.Average Interval
—Specifies the interval for gathering the average throughput.WARNING: | Diagnostic profiles are not persistent, which means that when you undeploy an application or restart a server, all diagnostic profiles are lost. |
The com.bea.wlevs.dataservices
application includes the MonitorProcessor
which in turn is associated with a default EPL rule used to filter the events that are outputted to the diagnostic Dashboard. You can change this EPL rule, or add new ones, if you want to customize this filtering.
The event type used in the EPL rules is com.bea.wlev.dataservice.cep.DSMonitorEvent
; it has the following properties:
For example, if you want to filter the monitoring events by type and metric, you might change the EPL rules to the following:
SELECT * FROM DSMonitorEvent
RETAIN 1 EVENT
WHERE metric < 300 AND type = 'avg-latency'
SELECT * FROM DSMonitorEvent
RETAIN 1 EVENT
WHERE metric < 300 AND type = 'avg-throughput'
SELECT * FROM DSMonitorEvent
RETAIN 1 EVENT
WHERE metric < 300 AND type = 'max-latency'
If you want to continuously view three evnets where the number of metrics is less than 300 and group the events by type, try this EPL rule:
SELECT *, COUNT(metric)
FROM DSMonitorEvent
RETAIN BATCH OF 3 EVENTS PARTITION BY type
WHERE metric < 300
HAVING COUNT(metric) = 3
OUTPUT LAST 1 EVERY 3 EVENTS
If you want to continuously view three evnets where the average number of metrics is less than 300 and group the events by type, try this EPL rule:
SELECT *, AVG(metric)
FROM DSMonitorEvent
RETAIN BATCH OF 3 EVENTS PARTITION BY type
HAVING AVERAGE(metric) < 300
OUTPUT LAST 1 EVERY 3 EVENTS
To change the EPL rules of the dataservices Application, follow these steps:
Domain
>
Server
> Applications > com.bea.wlevs.dataservices> Stages > MonitorProcessor
, where Domain
is the name of your domain and Server
is the name of your server.
The event repository feature of Oracle CEP allows you to record events flowing through an event processing network (EPN) and store them so you can later play back the events. You configure the recording and playing back of events per stage, such as a processor or stream. Additionally, only events coming out of an event source can be recorded, and playback is possible only on event sinks (events are played back to the inbound side of the event sink stage.)
The only configuration options of record and playback that you can control using Visualizer is time and speed. You must manually update the appropriate component file to to configure the other options.
The Record and Playback Visualizer panels for a particular stage are divided into three sections, as described in the following bullets. The bullets describe the Record panel in particular, although the Playback panel is very similar with just a few additional properties, such as speed and repeat. The panels are as follows:
<record-parameters>
element for a stage in the component configuration file. The entry details the recording start and end times as well as the event type you want to record. When you configure the recording entry in the application, the start and end time is optional although the event type is mandatory. Refer to Using a Persistent Store to Record and Playback Events for detailed information about how event and record playback works and how to configure a component. Refer to Event Record and Playback Example) for an example.
<record-parameters>
child element of the stage (<processor>
, <stream>
, or <adapter>
) to configure a record operation and a <playback-parameters>
child element to configure a playback operation. The following example shows how to add record and playback to the helloworldProcessor
of the HelloWorld sample application; relevant sections shown in bold:<processor>
<name>helloworldProcessor</name>
<record-parameters>
<dataset-name>test1data</dataset-name>
<event-type-list>
<event-type>HelloWorldEvent</event-type>
</event-type-list>
<provider-name>test-rdbms-provider</provider-name>
</record-parameters>
<playback-parameters>
<dataset-name>test1data</dataset-name>
<event-type-list>
<event-type>HelloWorldEvent</event-type>
</event-type-list>
<provider-name>test-rdbms-provider</provider-name>
<playback-speed>1.0</playback-speed>
<loopback>false</loopback>
</playback-parameters>
<rules>
<rule id="helloworldRule"> select * from HelloWorldEvent retain 1 event </rule>
</rules>
<bindings/>
</processor>
WARNING: | The changes to the calendar and clock are not committed until you click Update Schedule. |
Visualizer keeps track of whether a particular stage is currently recording or playing back events; based on this information, the Start Recording and End Recording buttons may be enabled or disabled as appropriate.
When you start recording using Visualizer, Oracle CEP uses the event type information from your record entry and begins recording immediately; the pre-scheduled time, if any, remains unchanged. Use the End Recording button to stop recording of your session immediately
You can use the replace rule feature of Visualizer to modify an existing rule. However, you should use this feature with extreme caution; this is because, internally, Visualizer first deletes the rule and then adds it back again with the replaced text. The deletion of the rule causes all states to be lost befor the rule is added again. For this reason, you should replace only stateless rules.
Note: | Not all stage’s configuration can be updated by Visualizer. A Modify button will appear if the configuration can be updated. |
Deploying an application refers to uploading to the server the JAR file that contains the application and then installing it, which makes it available to clients.
Oracle CEP internally deploys an application as a two step processes. The first step involves starting the application bundle inside the OSGi container. The second step involves starting and initializing the application. Because the second step is asynchrous in nature, Visualizer does not wait for the completion of the second operation. As soon as the application has successfully started, Visualizer’s navigation tree will be updated automatically with the new deployment and a successful message will be send to the dashboard. However, if the application fails to start, you must check for errors on the server side because no messages/updates will occur on the Visualizer.
Your application is deployed and ready for clients to use.
When you uninstall an application, you completely remove it from the server so that clients can no longer access it.