Retrieving cluster details

Retrieving cluster details

The SC//Reliantâ„¢ Virtual Controller (RVC) can retrieve details about a cluster and each of the nodes in the cluster. These details include whether the cluster is in maintenance mode, which node is considered the primary (or active) node in the cluster, and whether the node is in standby or considered unclean by the clustering software. You can use the SC//Reliant API to retrieve these details or use the SC//Reliant Virtual Controller CLI if you have direct access to the node.

There are two SC//Reliant Virtual Controller methods within the cluster module that provide different details: cluster.info and cluster.status. For more details, see rvc cluster.

The following shows you how to retrieve cluster details using either the API or the RVC CLI.

Using the SC//Reliant API

The following are API examples for retrieving cluster details using our provided Ruby script. The output of each of these API calls is a job ID, which you then retrieve the payload of to gather the details. For more information about how to use this script, see API examples using Ruby.

The following example retrieves cluster information. Just replace the <customer_code> and the sit0001red0 hostname with the hostname of the node in the cluster you want to retrieve details for.

ruby api.rb <customer_code> POST api/v2/jobs/rvc '{"method":"cluster.info","hostnames":["sit0001red0"]}' | jq .id

The following example retrieves cluster status details.

ruby api.rb <customer_code> POST api/v2/jobs/rvc '{"method":"cluster.status","hostnames":["sit0001red0"]}' | jq .id

Use the job ID from the API output to retrieve the payload details. Simply replace <job_id> in the following example with your job ID.

ruby api.rb <customer_code> GET api/jobs/<job_id>\?include_payload=true | jq .payload

Using the SC//Reliant Virtual Controller 3.x CLI

If you have direct access to the node, you can use the SC//Reliant Virtual Controller (RVC) CLI to query the cluster details. For more information about the RVC CLI output, see rvc cluster.

The following example retrieves cluster information.

rvc cluster info

The following example retrieves cluster status details.

rvc cluster status