Get cluster status

Select a documentation version:

To get the status of your AlloyDB Omni cluster, complete one of the following sets of instructions:

Before you begin

Before you begin, create your cluster.

Ansible

To get your cluster's status using Ansible, complete the following instructions:

  1. Create an Ansible playbook for the google.alloydbomni_orchestrator.status role.

    - name: STATUS_PLAYBOOK_NAME
      hosts: localhost
      vars:
        ansible_become: true
        ansible_user: ANSIBLE_USER
        ansible_ssh_private_key_file: ANSIBLE_SSH_PRIVATE_KEY_FILE
      roles:
      - role: google.alloydbomni_orchestrator.status
    

    Replace the following variables:

    • STATUS_PLAYBOOK_NAME: name of your Ansible playbook. For example, My cluster status.

    • ANSIBLE_USER: OS user that Ansible uses to log into your AlloyDB Omni nodes.

    • ANSIBLE_SSH_PRIVATE_KEY_FILE: private key Ansible uses to connect to your AlloyDB Omni nodes using SSH.

  2. Run the playbook.

    ansible-playbook STATUS_PLAYBOOK_PATH -i DEPLOYMENT_SPECIFICATION_PATH \
          -e resource_type="RESOURCE_TYPE" -e resource_name=RESOURCE_NAME

    Replace the following variables:

    • STATUS_PLAYBOOK_PATH: path to the playbook that you created in step one.

    • DEPLOYMENT_SPECIFICATION_PATH: path to the deployment specification you created in Install AlloyDB Omni components.

    • RESOURCE_TYPE: resource type you want the status of. For example, this could be DBCluster or PgBouncer.

    • (Optional) RESOURCE_NAME: name of the resource that you want the status of. For example, this could be the name of the DBCluster or PgBouncer resource.

AlloyDB Omni orchestrator CLI

To get your cluster's status using the AlloyDB Omni orchestrator CLI, run the following alloydbctl command:

alloydbctl get -d DEPLOYMENT_SPECIFICATION_PATH_PATH -t RESOURCE_TYPE -n RESOURCE_NAME

Replace the following variables:

  • DEPLOYMENT_SPECIFICATION_PATH_PATH: path to the deployment specification you created in Install AlloyDB Omni components.

  • RESOURCE_TYPE: resource type you want the status of. For example, this could be DBCluster or PgBouncer.

  • (Optional) RESOURCE_NAME: name of the resource that you want the status of. For example, this could be the name of the DBCluster or PgBouncer resource.