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.

Use the following script procedures to query your cluster configuration:

checkIfClusterExists

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

Table 1. checkIfClusterExists argument description . Run the script to see if the cluster exists.
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.

Table 2. checkIfClusterMemberExists argument descriptions . Run the script to see if the cluster member exists.
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

This script displays the script procedures that the AdminClusterManagement script library supports.
Table 3. help argument description . Run the script to display detailed help for the script. Specify the name of the script.
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.

Table 4. listClusterMembers argument description . Run the script to list the cluster members.
Argument Description
clusterName Specifies the name of the cluster of interest.

Syntax

AdminClusterManagement.listClusterMembers(clusterName)

Example usage

AdminClusterManagement.listClusterMembers("myCluster")