Visualizer Help

     Previous  Next    Open TOC in new window    View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

Typical Application Tasks

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:

 


Monitoring the Throughput and Latency of a Stage or Path in the EPN

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:

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
  2. Expand the appname > Stages node to see a list of the EPN stages in the domain tree.
  3. Click on the stage of the application for which you want to monitor its latency or throughput, or the first stage in the path that you want to monitor.
  4. In the right pane, click the General tab.
  5. Click the Create Diagnostics button. An accordion menu with three tabs appears.
  6. Click the top Diagnostic Profile Information tab and enter the information as follows:
    • Enter the name of the diagnostic profile you are about to create in the Profile Name field.
    • Select whether you want to enable the profile for immediate use.
  7. Click the Latency tab in the accordion menu. Enter the information about the type of monitoring information you want to gather about latency in the Diagnostic Information section as follows:
    • 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:

    • If you want to monitor just the current stage, rather than a path in the EPN, set the Start and End Stage Name to the name of the current stage. Select Entry for the Start Stage Name and Exit for the End Stage Name.
    • If you want to monitor a path in the EPN, Visualizer assumes that the current stage is the start of the path, and thus automatically selects it for the Start Stage Name field. Specify whether the start of the path should be the entry or exit of the current stage. Then select the End Stage name, or the end of the path you want to monitor, and specify whether the end of the path should be the entry or exit of the stage.
  8. Click the Throughput tab in the accordion menu. Enter the information about the type of monitoring information you want to gather about throughput as follows:
    • Average Throughput Metric—Specifies that you want to monitor the average throughput of events flowing through the stage.
    • Stage Name—Specify whether you want to monitor the throughput at the entry or exit of 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.
  9. Click Save. The saved diagnostic profile appears in the left domain tree, under the stage from which you created it.
  10. WARNING: Diagnostic profiles are not persistent, which means that when you undeploy an application or restart a server, all diagnostic profiles are lost.
  11. Click the Dashboard link at the top of Visualizer to go to the diagnostics dashboard window.
  12. Drag the diagnostic profile you created in a preceding step from the domain tree in the left pane to the table at the bottom of the right pane; drop the diagnostic profile into the Profile Name column of the table.
  13. Click on the name of the diagnostic profile in the table; you should start seeing latency and throughput information in the graphs in the middle of the dashboard.
  14. The Management Events section at the top of the Dashboard displays alerts about the incoming monitoring events. The Visualizer monitoring feature defines a set of default EPL rules that specify when these alerts show up in the Management Events table; you can change the EPL rules to customize this behavior, as describe in Changing the EPL Monitoring Filtering Rules.

 


Changing the EPL Monitoring Filtering Rules

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:

  1. In the left pane, click 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.
  2. In the right pane, click the Rules tab. The Rules table appears.
  3. To change the default rule, click its name in the Rules table, make the change in the Rule text box in the Working Area, and click Replace Rule.
  4. To create a new Rule, enter a rule ID and the rule text in the appropriate text boxes in the Working Area, then click Create Rule.

 


Viewing the Event Processing Network (EPN) of an Application

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
  2. Click the name of the application shown below the Applications node.
  3. In the right pane, click the Event Processing Network tab.
  4. In the Layout drop-down choice box, chose your favorite layout, such as hierarchic or organic.
  5. Alternately, expand the appname > EPN node in the left pane to see a list of the EPN stages in the domain tree. Click on an individual stage to see its configuration.

 


Recording and Playing Back Events Flowing Through an EPN

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:

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.

  1. Using your favorite XML editor or IDE, edit the configuration file of the stage for which you want to configure record and playback. Add a <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:
  2.     <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>
  3. Redeploy the application so the new configuration takes effect.
  4. Invoke Visualizer.
  5. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
  6. Expand the appname > Stages node to see a list of the EPN stages in the domain tree.
  7. Click on the stage for which you added record and playback configuration to its configuration file.
  8. In the right pane, click the Record tab.
  9. If you want to change the time to start and end recording, click on the entry in the table, update the dates in the Change Schedule area, then click Update Schedule.
  10. WARNING: The changes to the calendar and clock are not committed until you click Update Schedule.
  11. Click Start Recording to start recording, End Recording to end.
  12. 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

  13. To playback, click the Playback tab. The buttons below work similarly to those of the Record tab.

 


Replacing a Rule Associated With a Processor

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.

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
  2. Expand the appname > Stages node to see a list of the EPN stages in the domain tree.
  3. Click on the processor to which you want to modify a rule.
  4. In the right pane, click the Rules tab.
  5. Select the rule you want to replace in the table.
  6. In the Working Area, change the text of rule in the Rule text box.
  7. Click Replace Rule.

 


Adding or Deleting Rules From a Processor

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
  2. Expand the appname > Stages node to see a list of the EPN stages in the domain tree.
  3. Click on the processor to which you want to add or delete rules.
  4. In the right pane, click the Rules tab.
  5. To delete a rule, select a rule in the table and click Delete Rule.
  6. To add a rule, enter the rule ID and rule text in the boxes at the bottom of the page, then click New Rule.

 


Viewing and Changing the Configuration of a Stage

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
  2. Expand the appname > Stages node to see a list of the EPN stages in the domain tree.
  3. Click on the stage whose configuration you want to update.
  4. In the right pane, click the General tab.
  5. Note: Not all stage’s configuration can be updated by Visualizer. A Modify button will appear if the configuration can be updated.
  6. If a stage’s configuration can be updated, click Modify.
  7. Enter the new values.
  8. Click Commit.

 


Deploying an Application

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.

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which you want to deploy the application.
  2. In the right pane, click the Deployment tab.
  3. Click the Install button.
  4. Click the Upload tab.
  5. Click on the "..." button to invoke a file browsing window, browse to the directory that contains the JAR file of application, and click Open.
  6. Click Upload. The JAR file appears in the table of applications.
  7. Click the Install button and select your application in the table.
  8. Click Deploy.
  9. Click OK.

Your application is deployed and ready for clients to use.

 


Uninstalling an Application

When you uninstall an application, you completely remove it from the server so that clients can no longer access it.

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which you want to uninstall the application.
  2. In the right pane, click the Deployment tab.
  3. In the Deployments table, select the application you want to uninstall by checking the box to the left of its name.
  4. Click Uninstall.
  5. Click OK.

 


Suspending or Resuming an Application

  1. In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which you want to suspend or resume an application.
  2. In the right pane, click the Deployment tab.
  3. In the Deployments table, select the application you want to suspend or resume by checking the box to the left of its name.
  4. Click Suspend to suspend the application or Resume to resume the application.
  5. Click OK.

  Back to Top       Previous  Next