Managing failed events using scripts
You can manage failed event sequence instances in the wsadmin scripting client by invoking the operations provided by the FailedEventSequenceManager managed beans (MBeans).
Looking up the MBeans
A FailedEventSequenceManager MBean is registered for each installed monitor model version. The registered MBeans have the monitorModelId and monitorModelVersion key properties defined. You can use these key properties to retrieve the MBean corresponding to a specific monitor model version. Use the AdminControl object provided in the wsadmin scripting client to interact with the MBean.The following examples use Jython.
The following example shows how to look up all the FailedEventSequenceManager
MBeans.
managerNames = AdminControl.queryNames('type=FailedEventSequenceManager,*').splitlines()
The
following example shows how to look up the FailedEventSequenceManager
MBean for a specific monitor model version. The value of the monitorModelVersion
key property is typically a 14 digit number that represents a time
stamp. Typically a monitor model version is displayed to a user formatted
as a time stamp, such as 2009-08-27T12:03:02. You
must remove all non-numeric characters from the timestamp when specifying
the monitorModelVersion key property. For example, a monitor model
version of 2009-08-27T12:03:02 should be specified
as 20090827120302. managerName = AdminControl.queryNames('type=FailedEventSequenceManager,monitorModelId=MY_MODEL_ID,monitorModelVersion=MY_MODEL_VERSION,*')
Many
of the operations on the AdminControl object convert the return values
into strings. Because you do not always want this conversion, the
AdminControl object also provides operations with names ending in _jmx that
do not convert the return values. The AdminControl queryNames operation
returns a string version of the MBean's ObjectName, but the _jmx operations
require a parameter of type ObjectName. Use the makeObjectName operation
on the AdminControl object to retrieve the ObjectName of the MBean.The
following example shows how to look up the FailedEventSequenceManager
MBean for a specific monitor model version and retrieve the ObjectName
of the MBean.
managerName = AdminControl.queryNames('type=FailedEventSequenceManager,monitorModelId=MY_MODEL_ID,monitorModelVersion=MY_MODEL_VERSION,*')
managerObjectName = AdminControl.makeObjectName(managerName)