Cluster query scripts
The scripting library provides script procedures to automate the application server configurations. Use the scripts in this topic to determine if clusters and cluster members exist and to display the clusters and cluster members configured in the environment. We can run each script individually, or combine procedures to create custom automation scripts.
The AdminClusterManagement script procedures are located in the app_server_root/scriptLibraries/server/V70 directory.
Use the following script procedures to query your cluster configuration:
checkIfClusterExists
This script displays whether the cluster of interest exists in the configuration.
Argument Description clusterName Name of the cluster of interest. Syntax
AdminClusterManagement.checkIfClusterExists(clusterName)Example usage
AdminClusterManagement.checkIfClusterExists("myCluster")
checkIfClusterMemberExists
This script displays whether a specific cluster member exists in your cluster configuration.
Argument Description clusterName Name of the cluster to query. serverName Name of the server of interest. Syntax
AdminClusterManagement.checkIfClusterMemberExists(clusterName, serverName)Example usage
AdminClusterManagement.checkIfClusterMemberExists("myCluster", "myClusterMember")
help
This script displays the script procedures that the AdminClusterManagement script library supports.
Argument Description script Name of the script of interest. Syntax
AdminResources.help(script)Example usage
AdminResources.help("createClusterWithoutMember")
listClusters
This script displays each cluster that exists in the configuration. This script does not require arguments.
Syntax
AdminClusterManagement.listClusters()Example usage
AdminClusterManagement.listClusters()
listClusterMembers
This script displays the server cluster members that exist in a specific cluster configuration.
Argument Description clusterName Name of the cluster of interest. Syntax
AdminClusterManagement.listClusterMembers(clusterName)Example usage
AdminClusterManagement.listClusterMembers("myCluster")
Use the script library to automate the application serving environment Automating server administration Clustering servers with wsadmin scripting Balancing workloads Cluster configuration scripts