Accessing DMS Metrics with WLDF

Oracle Dynamic Monitoring Service 6-13 Used to identify if an event was triggered from the START or STOP of a PHASE_ SENSOR ■ Context Type Conditions Used to identify if the event was generated from a unit of work whose context contains a value for example, USER ■ Noun Type Conditions Used to identify if the event was triggered from a sensor whose noun is of a specific type for example, JDBC_CONNECTION ■ Logical AND and OR combinations of the above conditions

6.7.1 Configuring the DMS Event System

Configuration is recorded in each servers dms_config.xml file. MBean updates can be made at runtime using command line interface CLI commands and through the Event Configuration Mbean. Configuration updates are applied to the running system in a thread safe, but non-atomic, manner. The object name of the DMS Event configuration MBean is: oracle.dms.event.config:name=DMSEventConfigMBean,type=JMXEventCo nfig To review the current state of your systems DMS event configuration, use the following command: listDMSEventConfiguration[server=server] The resulting output will look similar to this: Event routes: FILTER : auto662515911 DESTINATION : destination1 ENABLED : true FILTER : filter0 DESTINATION : q ENABLED : true Filters with no event route: Fred Destinations with no event route: des4

6.7.1.1 Adding and Editing Filters

Filters define the rules that select which events are considered for tracing. The following example shows how to add a filter that selects all events related to JDBC operations: addDMSEventFilterid=myJDBCFilter, props={condition: NOUNTYPE starts_with JDBC_} This filter assumes that all DMS sensor updates associated with JDBC operations are performed on nouns of types whose names begin JDBC_. If the rule must be modified, the filter may be updated as shown in the following example: updateDMSEventFilterid=myJDBCFilter, props={condition: NOUNTYPE starts_with 6-14 Oracle Fusion Middleware Performance and Tuning Guide JDBC_ OR NOUNTYPE starts_with MDS_}; For more information about the syntax used to describe a filters rule the condition property, refer to the WebLogic Scripting Tool Command Reference or the command help.

6.7.1.2 Adding and Editing Destinations

Destinations encapsulate logic for responding to events. For example, a basic destination will log the event, a different destination may transform an event and pass it to another system for further processing. The following example shows how to add a destination that will log events: addDMSEventDestinationid=myLoggerDestination, class=oracle.dms.trace2.runtime.LoggerDestination, props={loggerName:myLogger}; Note that merely adding the destination is not sufficient for events to be logged; to log the events, you must associate a filter with a destination using an eventRoute, and the eventRoute must be enabled default. The types of destination available, and their configuration options, are described in Section 6.7.2 . The following example shows how to edit an existing destination: updateDMSEventDestinationid=myLoggerDestination, props={loggerName:myTraceLogger};

6.7.1.3 Adding and Editing Event Routes

The following example shows how to join the filter and destination created above: addDMSEventRoutefilterid=myJDBCFilter, destinationid=myLoggerDestination Note that you can invoke addDMSEventRoute without an explicit filterId. In these scenarios, all events are passed to the destination without filtering. To remove a filter or destination, you must first remove the event routes associated with the filter or destination even if the event route is disabled. For example, if you wanted to remove myJDBCFilter, you would first need to remove the eventRoute created in the previous example, and then remove the filter as shown in the following example: removeDMSEventRoutefilterid=myJDBCFilter, destinationid=myLoggerDestination removeDMSEventFilterid=myJDBCFilter

6.7.1.4 Compound Operations

It is possible to create a filter and an eventRoute based on that filter using a single command rather than using two separate commands as shown in Section 6.7.1.3 . Note however that the destination to be used by the event route must already be defined: enableDMSEventTrace destinationid=myLoggerDestination, condition=NOUNTYPE starts_with JDBC_ In the example above, enableDMSEventTrace automatically creates a filter with the specified condition, and also creates and enables an event route using the new filter and the nominated destination. The output is shown in the following example: Filter auto605449842 using Destination myLoggerDestination added, and