Cluster query scripts


The scripting library provides multiple script procedures to automate the appserver 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 the environment. We can run each script individually, or combine procedures to create custom automation scripts.

The AdminClusterManagement script procedures are located in...

WAS_HOME/scriptLibraries/server/V70

Use the following script procedures to query the cluster configuration:

 

checkIfClusterExists

This script displays whether the cluster of interest exists in the configuration.

To run the script, specify the cluster name argument, as defined in the following table:
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 the cluster configuration.

To run the script, specify the cluster name and server cluster member arguments, as defined in the following table:
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.

To display detailed help for a specific script, specify the name of the script of interest, as defined in the following table:
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.

To run the script, specify the cluster name argument, as defined in the following table:
Argument Description
clusterName Name of the cluster of interest.

Syntax

AdminClusterManagement.listClusterMembers(clusterName)

Example usage

AdminClusterManagement.listClusterMembers("myCluster")





 

Related tasks


Use the script library to automate the application serving environment
Automating server administration using the scripting library
Clustering servers with scripting
Balancing workloads

 

Related


Cluster configuration scripts