Configuring websphere performance monitoring service

IBM WebSphere Application Server

You can use below script sample script for websphere performance monitoring service and configuration of  end points.

#----------------------------------------------------------------------------------
#-- Configuring performance monitoring service 
#----------------------------------------------------------------------------------

set aServer [$AdminConfig getid /Node:myNode/Server:newServer/]
set aPMIService [$AdminConfig list PMIService $aServer]
set enableAttr [list enable true]
set specAttr [list initialSpecLevel beanModule=H:cacheModule=H:connectionPoolModule=H:j2cModule=H:jvmRuntimeModule=H:orbPerfModule=H:servletSessionsModule=H:systemModule=H:threadPoolModule=H:transactionModule=H:webAppModule=H:webServicesModule=H:wlmModule=H:wsgwModule=H]
set attrs [list $enableAttr $specAttr]
$AdminConfig modify $aPMIService $attrs
$AdminConfig save

#--------------------------------------------------------------------------------
#-- Configuring end points 
#--------------------------------------------------------------------------------

set aServerEntry [$AdminConfig getid /ServerEntry:newServer/]
set endpoints [lindex [$AdminConfig showAttribute $aServerEntry specialEndpoints] 0]

# list all configured end points
puts "List of configured end points:"
foreach aEndpoint $endpoints {
puts [$AdminConfig showall $aEndpoint]
}

# modify existing end points
puts "Modify existing end points"
foreach aEndpoint $endpoints {
if {[$AdminConfig showAttribute $aEndpoint endPointName] == "BOOTSTRAP_ADDRESS"} {
puts "Modify BOOTSTRAP_ADDRESS"
$AdminConfig modify $aEndpoint [list [list port 2810] [list host newHost]]
} else if {[$AdminConfig showAttribute $aEndpoint endPointName] == "SOAP_CONNECTOR_ADDRESS"} {
puts "Modify SOAP_CONNECTOR_ADDRESS"
$AdminConfig modify $aEndpoint [list [list port 8881] [list host newHost]]
} else if {[$AdminConfig showAttribute $aEndpoint endPointName] == "DRS_CLIENT_ADDRESS"} {
puts "Modify DRS_CLIENT_ADDRESS"
$AdminConfig modify $aEndpoint [list [list port 7874] [list host newHost]]
} else if {[$AdminConfig showAttribute $aEndpoint endPointName] == "SAS_SSL_SERVERAUTH_LISTENER_ADDRESS"} {
puts "Modify SAS_SSL_SERVERAUTH_LISTENER_ADDRESS"
$AdminConfig modify $aEndpoint [list [list port 1005] [list host newHost]]
} else if {[$AdminConfig showAttribute $aEndpoint endPointName] == "CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS"} {
puts "Modify CSIV2_SSL_SERVERAUTH_LISTENER_ADDRESS"
$AdminConfig modify $aEndpoint [list [list port 1007] [list host newHost]]
} else if {[$AdminConfig showAttribute $aEndpoint endPointName] == "CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS"} {
puts "Modify CSIV2_SSL_MUTUALAUTH_LISTENER_ADDRESS"
$AdminConfig modify $aEndpoint [list [list port 1009] [list host newHost]]
}
}
$AdminConfig save

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply