DMS Execution Requests and Sub-Tasks

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 Oracle Dynamic Monitoring Service 6-15 event-route enabled for server AdminServer

6.7.2 Configuring Destinations

DMS offers the following types of destinations: ■ LoggerDestination ■ MBean Creator Destination ■ HTTP Request Tracker Destination ■ JRockit Flight Recorder Destination

6.7.2.1 LoggerDestination

Instances of logger destinations write events to the named logger at a log level of FINER. The loggerName property specifies the name of a logger, but the logger does not necessarily have to be described in logging.xml, though it can be. If the logger name refers to a logger that is explicitly named in logging.xml, then the logger is referred to as a static logger see Section 6.7.2.1.1 . If the logger name refers to a logger that is not explicitly named in logging.xml, then the logger is referred to as a dynamic logger see Section 6.7.2.1.2 . Use in the default configuration : the default configuration defines a logger destination, with an identification of LoggerDestination. This particular instance does not form part of any eventRoute and therefore is not active. It is provided for convenience, and uses a dynamic logger.

6.7.2.1.1 Static Loggers and Handlers Loggers are the objects to which log records are

presented. Log handlers are the objects through which log records are written to log files. For complete control over the log file to which DMS trace data is written, define the logger named in the logger destination in logging.xml. Doing this allows you to explicitly define the name of the log file, the maximum size, format, file rotation and policies. Oracle recommends using commands like the example below to update the configuration. setLogLevellogger=myTraceLogger, level=FINER, addLogger=1; configureLogHandlername=my-trace-handler, addToLogger=[myTraceLogger], path=tmpmyTraceLogFilestrace, maxFileSize=10m, maxLogSize=50m, handlerType=oracle.core.ojdl.logging.ODLHandlerFactory, addHandler=1, useParentHandlers=0; configureLogHandlername=my-trace-handler, Description The LoggerDestination writes each event to the associated logger. Implementing Class oracle.dms.trace2.runtime.LoggerDestination Properties loggerName The name of the ODL logger to which events will be written.