When you deploy or remove a monitor model application,
changes are made to the Common Event Infrastructure (CEI) event service
configuration that require the CEI event service to be stopped, notified
of the new configuration, and restarted. IBM® Business Monitor attempts
to perform these steps automatically, but if you have disabled the Synchronize
changes with Nodes option in the administrative console
preferences, IBM Business Monitor cannot
automatically reload the CEI event service configuration when you
deploy or remove a monitor model application.
About this task
If the
Synchronize changes with Nodes option
is not enabled, complete the following steps to reload your CEI event
service configuration:
Procedure
- Synchronize the configuration across all nodes. You
can perform this synchronization from within the administrative console,
or you can use the following wsadmin script:
# synchronize the configuration across all the running nodes in the cell
nodeSyncBeanNames = AdminControl.queryNames('type=NodeSync,*').split()
for nodeSyncBeanName in nodeSyncBeanNames:
AdminControl.invoke(nodeSyncBeanName, 'sync')
- Stop the CEI event service application. Because
the application is hidden, you must use a wsadmin script. To stop
the CEI event service on a server, run the following script:
serverName = 'xxxx'
nodeName = 'yyyy'
applicationName = 'EventService'
applicationManager = AdminControl.queryNames('type=ApplicationManager,node=%s,process=%s,*' % (nodeName, serverName))
AdminControl.invoke(applicationManager, 'stopApplication', '[%s]' % applicationName, '[java.lang.String]')
To
stop the CEI event service on a cluster, run the following script:clusterName = 'zzzz'
applicationName = 'EventService'
# get list of cluster members
clusterMembers = AdminConfig.getid('/ServerCluster:%s/ClusterMember:/' % clusterName).splitlines()
# stop application in each cluster member
for clusterMember in clusterMembers:
# cluster member server name and node name
serverName = AdminConfig.showAttribute(clusterMember, "memberName")
nodeName = AdminConfig.showAttribute(clusterMember, "nodeName")
# get ApplicationManager MBean for the cluster member
applicationManager = AdminControl.queryNames('type=ApplicationManager,node=%s,process=%s,*' % (nodeName, serverName))
# if the ApplicationManager MBean was found (for example, cluster member is running), stop the application
if(len(applicationManager) > 0):
AdminControl.invoke(applicationManager, 'stopApplication', '[%s]' % applicationName, '[java.lang.String]')
- Invoke the reloadResources method on the ConfigUtil MBean
on the target server (or list of cluster members) of the CEI event
service. To reload the resources on a server, run the following
script:
serverName = 'xxxx'
nodeName = 'yyyy'
configUtil = AdminControl.queryNames('type=ConfigUtil,node=%s,process=%s,*' % (nodeName, serverName))
AdminControl.invoke(configUtil, 'reloadResources', '[]', '[]')
To
reload the resources on a cluster, run the following script:clusterName = 'zzzz'
# get list of cluster members
clusterMembers = AdminConfig.getid('/ServerCluster:%s/ClusterMember:/' % clusterName).splitlines()
# stop application in each cluster member
for clusterMember in clusterMembers:
# cluster member server name and node name
serverName = AdminConfig.showAttribute(clusterMember, "memberName")
nodeName = AdminConfig.showAttribute(clusterMember, "nodeName")
# get ConfigUtil MBean for the cluster member
configUtil = AdminControl.queryNames('type=ConfigUtil,node=%s,process=%s,*' % (nodeName, serverName))
# if the ConfigUtil MBean was found (for example, cluster member is running), stop the application
if(len(configUtil) > 0):
AdminControl.invoke(configUtil, 'reloadResources', '[]', '[]')
- Start the CEI event service application. Because
the application is hidden, you must use a wsadmin script. To start
the CEI event service on a server, run the following script:
serverName = 'xxxx'
nodeName = 'yyyy'
applicationName = 'EventService'
applicationManager = AdminControl.queryNames('type=ApplicationManager,node=%s,process=%s,*' % (nodeName, serverName))
AdminControl.invoke(applicationManager, 'startApplication', '[%s]' % applicationName, '[java.lang.String]')
To
start the CEI event service on a cluster, run the following script:clusterName = 'zzzz'
applicationName = 'EventService'
# get list of cluster members
clusterMembers = AdminConfig.getid('/ServerCluster:%s/ClusterMember:/' % clusterName).splitlines()
# stop application in each cluster member
for clusterMember in clusterMembers:
# cluster member server name and node name
serverName = AdminConfig.showAttribute(clusterMember, "memberName")
nodeName = AdminConfig.showAttribute(clusterMember, "nodeName")
# get ApplicationManager MBean for the cluster member
applicationManager = AdminControl.queryNames('type=ApplicationManager,node=%s,process=%s,*' % (nodeName, serverName))
# if the ApplicationManager MBean was found (for example, cluster member is running), stop the application
if(len(applicationManager) > 0):
AdminControl.invoke(applicationManager, 'startApplication', '[%s]' % applicationName, '[java.lang.String]')