Select a documentation version: <button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">18.4.0</button>

- [Current (18.4.0)](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/cluster-status.md.txt)
- [18.4.0](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/18.4.0/docs/cluster-status.md.txt)
- [18.3.0](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/18.3.0/docs/cluster-status.md.txt)
- [18.1.0](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/18.1.0/docs/cluster-status.md.txt)

<br />

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

<br />

- Using [Ansible](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/cluster-status.md.txt#ansible)

- Using the [AlloyDB Omni orchestrator CLI](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/cluster-status.md.txt#alloydbctl)

## Before you begin

Before you begin, [create your cluster](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/create-cluster.md.txt).

## Ansible

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

1. Create an Ansible
   [playbook](https://docs.ansible.com/projects/ansible/latest/playbook_guide/playbooks_intro.html)
   for the `google.alloydbomni_orchestrator.status` role.

   ```yaml
   - name: STATUS_PLAYBOOK_NAME
     hosts: localhost
     vars:
       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.

   ```bash
   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](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/install-components.md.txt).

   - `RESOURCE_TYPE`:
     resource type you want the status of. For example, this could be
     [`DBCluster`](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/reference/dbcluster-spec.md.txt) or
     [`PgBouncer`](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/reference/pgbouncer-spec.md.txt).

   - (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:

```bash
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](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/install-components.md.txt).

- `RESOURCE_TYPE`:
  resource type you want the status of. For example, this could be
  [`DBCluster`](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/reference/dbcluster-spec.md.txt) or
  [`PgBouncer`](https://docs.cloud.google.com/alloydb/omni/redhat-orchestrator/current/docs/reference/pgbouncer-spec.md.txt).

- (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.