This section contains the typical application tasks you can perform with Oracle CEP Visualizer to manage EPL rules, including:
Note:
Oracle CQL replaces Event Processing Language (EPL) in Oracle CEP 11g Release 1 (11.1.1.4.0). Oracle CEP supports EPL for backwards compatibility. For more information, see Chapter 6, "Managing Oracle CQL Rules".Note:
Any changes to rules and Oracle high availability adapters are propagated to the other servers in the same group. That is, all rule and and Oracle high availability adapter configurations is automatically synchronized. Other configuration changes are not synchronized. For example, if you change record/playback or JMS adapter configuration on one server in a multi-server domain, then these changes are not synchronized with the other servers in the same group. For more information, see Chapter 18, "Managing Multi-Server Domains"For more information, see:
You can create a new rule in an existing Oracle CEP application that uses one or more EPL processors.
You can create a rule in an EPL processor using the Oracle CEP Visualizer.
To create a rule in an EPL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Expand the appname > Stages node to see a list of the EPN stages in the domain tree, where appname is the name of the application.
Click the EPL processor in which you want to create an EPL rule.
The Processor panel is displayed as Figure 7-1 shows.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 7-2 shows.
Click in the Rule ID field and enter the name of the rule you want to create.
Click in the Rule field and enter the EPL query string.
Click Create Rule.
A confirmation dialog appears as Figure 7-3 shows.
Click OK.
You can delete an existing rule in an existing Oracle CEP application that uses one or more EPL processors.
You can delete a rule in an EPL processor using the Oracle CEP Visualizer.
To delete a rule in an EPL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Expand the appname > Stages node to see a list of the EPN stages in the domain tree, where appname is the name of the application.
Click the EPL processor in which you want to create an EPL rule.
The Processor panel is displayed as Figure 7-1 shows.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 7-5 shows.
Decide what rules you want to delete:
To delete a single rule:
Select the rule you want to delete.
Click Delete Rule
A confirmation dialog appears as Figure 7-6 shows.
To delete all rules:
Click Cancel to unselect any rules that may be currently selected.
Click Delete All Rules.
A confirmation dialog appears as Figure 7-6 shows.
Click OK.
You can use the replace rule feature of Oracle CEP Visualizer to modify an existing rule. However, you should use this feature with extreme caution; this is because, internally, Oracle CEP 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 before the rule is added again. For this reason, you should replace only stateless rules.
You can replace a rule in an EPL processor using the Oracle CEP Visualizer.
To replace a rule in an EPL processor:
In the left pane, navigate to and expand the Applications node of the Oracle CEP instance to which the application is deployed.
Expand the appname > Stages node to see a list of the EPN stages in the domain tree, where appname is the name of the application.
Click the EPL processor in which you want to create an EPL rule.
The Processor panel is displayed as Figure 7-1 shows.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 7-5 shows.
Select the rule you want to replace.
Click in the Rule field and enter the new EPL query string.
Click Replace Rule.
A confirmation dialog appears as Figure 7-3 shows.
Click OK.
The com.bea.wlevs.dataservices
application includes the MonitorProcessor
which in turn is associated with a default rule used to filter the events that are outputted to the diagnostic Dashboard. You can change this rule, or add new ones, if you want to customize this filtering.
You can only change the dataservices application event filter rule using EPL rules.
The event type used in an EPL rule is com.bea.wlev.dataservice.cep.DSMonitorEvent
; it has the following properties:
profile
—Name of the diagnostic profile.
date
—Date and timestamp.
metric
—Metric number.
start
—Start stage name.
end
—End stage name.
type
—The type of metric; valid values are avg-latency
, avg-throughput
or max-latency
.
application
—Application name
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 events 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 events 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
For more information, see Oracle Complex Event Processing EPL Language Reference.
You can change the dataservices application event filter EPL rule using the Oracle CEP Visualizer.
To change the dataservices application event filter rule using EPL:
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.
In the right pane, click the Rules tab.
The Rules tab appears as Figure 7-11 shows.
To create a new Rule, enter a the name of the rule in the Rule ID field, enter the EPL query string in the Rule field, then click Create Rule.
For more information, see Section 7.1, "Creating a Rule in an EPL Processor".
To delete an existing rule, select a rule in the table and click Delete Rule.
For more information, see Section 7.2, "Deleting a Rule From an EPL Processor".
To change the default rule, click its name in the Rules table, make the change in the Rule field in the Working Area, and click Replace Rule.
For more information, see Section 7.3, "Replacing a Rule in an EPL Processor".