|
||||||||||||||||||||||||||||||||||||||||||
|
Modifying the Event Handler Modifying the event handler requires exporting it, editing it, and then loading it back into the OMS via the import command. The export command simply specifies the name of the file in which to export the event handler. The export command below will populate the file myhandler with the contents of the event handler. oemctl export eventhandler myhandler The event handler can then be edited with any text editor. On Windows systems, notepad will work (Figure 5.4). The event handler file contains three main regions – blackouts, filters, and templates. Blackouts are used to tell the OMS not to act on an event. For certain nodes, a DBA may not care about some events and they should not be handled. A setting of true tells the event handler not to process the event. A setting of false indicates that no blackout exists and the event should be processed. Filters are used to determine which events are passed on to event logging or command execution. Each filter has a unique name. The default event handler above allows all events to be passed to both the command executor and event logger. Templates specify exactly how to respond to the event. Templates for the event logger will determine how the data is formatted to the log. Templates specified for command execution include the actual OS command to execute for the event.
After any changes are made, the event handler needs to be imported back into the OMS:
oemctl import eventhandler myhandler Now the OMS can be started again. oemctl start OMS To disable defined event handlers, execute the following command:
oemctl disable eventhandler
And finally, to view any errors encountered while using oemctl, view the log file in the $ORACLE_HOME/sysman/log directory.
|
|
||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||