Cluster query scripts
The scripting library provides multiple script procedures to automate your 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 that are configured in your environment. You 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.
checkIfClusterExists
This script displays whether the cluster of interest exists in your configuration.
Argument | Description |
---|---|
clusterName | Specifies the 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 | Specifies the name of the cluster to query. |
serverName | Specifies the name of the server of interest. |
Syntax
AdminClusterManagement.checkIfClusterMemberExists(clusterName, serverName)
Example usage
AdminClusterManagement.checkIfClusterMemberExists("myCluster", "myClusterMember")
help
Argument | Description |
---|---|
script | Specifies the name of the script of interest. |
Syntax
AdminResources.help(script)
Example usage
AdminResources.help("createClusterWithoutMember")
listClusters
This script displays each cluster that exists in your 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 | Specifies the name of the cluster of interest. |
Syntax
AdminClusterManagement.listClusterMembers(clusterName)
Example usage
AdminClusterManagement.listClusterMembers("myCluster")