> [!WARNING]
>
> **Preview**
>
>
> This feature is
>
> subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the
> [Service Specific
> Terms](https://docs.cloud.google.com/terms/service-terms#1).
>
> Pre-GA features are available "as is" and might have limited support.
>
> For more information, see the
> [launch stage descriptions](https://cloud.google.com/products/#product-launch-stages).

After you create high availability controllers, you can view a list of
controllers in your project, inspect a controller's details and audit logs, or
set up notification alerts. This information helps you verify a high
availability controller's configuration, zone readiness, and failover status.

This document explains how to view high availability controllers, inspect
controller audit logs, and set up notification alerts. For more information
about the requirements and limitations that apply when you manage high
availability controllers, see [About high availability
controllers](https://docs.cloud.google.com/compute/docs/instances/about-ha-controllers).

## Before you begin

- If you haven't already, set up [authentication](https://docs.cloud.google.com/compute/docs/authentication.md.txt). Authentication verifies your identity for access to Google Cloud services and APIs. To run code or samples from a local development environment, you can authenticate to Compute Engine by selecting one of the following options:

  Select the tab for how you plan to use the samples on this page:

  ### Console


  When you use the Google Cloud console to access Google Cloud services and
  APIs, you don't need to set up authentication.

  ### gcloud

  1.
     [Install](https://docs.cloud.google.com/sdk/docs/install) the Google Cloud CLI.

     After installation,
     [initialize](https://docs.cloud.google.com/sdk/docs/initializing) the Google Cloud CLI by running the following command:

     ```bash
     gcloud init
     ```


     If you're using an external identity provider (IdP), you must first
     [sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud.md.txt).

     > [!NOTE]
     > **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.

  2. [Set a default region and zone](https://docs.cloud.google.com/compute/docs/gcloud-compute.md.txt#set_default_zone_and_region_in_your_local_client).

  ### REST


  To use the REST API samples on this page in a local development environment, you use the
  credentials you provide to the gcloud CLI.
  1. [Install](https://docs.cloud.google.com/sdk/docs/install) the Google Cloud CLI.
  2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](https://docs.cloud.google.com/iam/docs/workforce-log-in-gcloud.md.txt).


  For more information, see
  [Authenticate for using REST](https://docs.cloud.google.com/docs/authentication/rest.md.txt)
  in the Google Cloud authentication documentation.

### Required roles


To get the permissions that
you need to view high availability controllers, view their audit logs, and set up notification alerts,

ask your administrator to grant you the
following IAM roles on the project:

- To view a list or the details of high availability controllers: [Compute Viewer](https://docs.cloud.google.com/iam/docs/roles-permissions/compute.md.txt#compute.viewer) (`roles/compute.viewer`)
- To view audit logs for a high availability controller: [Logs Viewer](https://docs.cloud.google.com/iam/docs/roles-permissions/logging.md.txt#logging.viewer) (`roles/logging.viewer`)
- To set up notification alerts:
  - [Monitoring AlertPolicy Editor](https://docs.cloud.google.com/iam/docs/roles-permissions/monitoring.md.txt#monitoring.alertPolicyEditor) (`roles/monitoring.alertPolicyEditor`)
  - [Monitoring NotificationChannel Editor](https://docs.cloud.google.com/iam/docs/roles-permissions/monitoring.md.txt#monitoring.notificationChannelEditor) (`roles/monitoring.notificationChannelEditor`)
  - [Logs Configuration Writer](https://docs.cloud.google.com/iam/docs/roles-permissions/logging.md.txt#logging.configWriter) (`roles/logging.configWriter`)


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


These predefined roles contain

the permissions required to view high availability controllers, view their audit logs, and set up notification alerts. To see the exact permissions that are
required, expand the **Required permissions** section:


#### Required permissions

The following permissions are required to view high availability controllers, view their audit logs, and set up notification alerts:

- To view a list of high availability controllers: `compute.haControllers.list`
- To view the details of a high availability controller: `compute.haControllers.get`
- To view the VM and its attached disks for a high availability controller:
  - `compute.instances.get`
  - `compute.disks.get`
- To view audit logs for a high availability controller:
  - `logging.logEntries.list`
  - `logging.logs.list`
  - `logging.logServiceIndexes.list`
  - `logging.logServices.list`
- To set up notification alerts:
  - `monitoring.alertPolicies.create`
  - `monitoring.notificationChannels.create`
  - `logging.notificationRules.create`


You might also be able to get
these permissions
with [custom roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles.md.txt) or
other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview.md.txt#predefined).

## View high availability controllers

To view the high availability controllers that exist in your project, use one of
the following methods:

- [View a list of high availability controllers](https://docs.cloud.google.com/compute/docs/instances/view-ha-controllers.md.txt#view-list)

- [View the details of a high availability controller](https://docs.cloud.google.com/compute/docs/instances/view-ha-controllers.md.txt#view-details)

### View a list of high availability controllers

To view a list of high availability controllers in your project, select one of
the following options:

### Console

1. In the Google Cloud console, go to the **VM instances** page.

   [Go to VM instances](https://console.cloud.google.com/compute/instances)
2. Click the **High availability controllers** tab. A pane that shows a
   list of high availability controllers in your project appears.

3. Optional: To refine your list of high availability controllers, in the
   **Filter** field, select
   the properties that you want to filter the controllers by.

### gcloud

To view a list of high availability controllers, use the [`gcloud preview
compute ha-controllers list`
command](https://docs.cloud.google.com/sdk/gcloud/reference/preview/compute/ha-controllers/list).

Based on whether you want to view high availability controllers across all
regions or in specific regions, run one of the following commands:

- View a list of high availability controllers across all regions in your
  project:

      gcloud preview compute ha-controllers list

- View a list of high availability controllers in specific regions:

      gcloud preview compute ha-controllers list \
          --regions=REGION_LIST

  Replace `REGION_LIST` with a comma-separated list of
  regions where your high availability controllers exist; for example,
  `us-central1,us-east1`.

The output is similar to the following:

    NAME           REGION       PRIMARY_ZONE   SECONDARY_ZONE  INSTANCE_NAME  ONGOING_FAILOVER  FAILOVER_INITIATION
    example-hac-1  us-central1  us-central1-a  us-central1-b   example-vm     False             AUTOMATIC
    example-hac-2  us-east1     us-east1-b     us-east1-c      example-vm-2   False             MANUAL_ONLY

### REST

Based on whether you want to view high availability controllers across all
regions or in a specific region, make one of the following `GET` requests:

- To view a list of high availability controllers across all regions in
  your project, make a `GET` request to the [preview
  `haControllers.aggregatedList`
  method](https://docs.cloud.google.com/compute/docs/reference/rest/2026-10-01-preview/haControllers/aggregatedList)
  with the `$apiVersion=2026-10-01-preview` query parameter in the request
  URL:

      GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/aggregated/haControllers?$apiVersion=2026-10-01-preview

- To view a list of high availability controllers in a specific region,
  make a `GET` request to the [preview `haControllers.list`
  method](https://docs.cloud.google.com/compute/docs/reference/rest/2026-10-01-preview/haControllers/list)
  with the `$apiVersion=2026-10-01-preview` query parameter in the request
  URL:

      GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/haControllers?$apiVersion=2026-10-01-preview

Replace the following:

- `PROJECT_ID`: the ID of your project.

- `REGION`: the region where you want to view high
  availability controllers.

When you view a list of high availability controllers in a specific region,
the output is similar to the following:

    {
      "id": "projects/example-project/regions/us-central1/haControllers",
      "items": [
        {
          "kind": "compute#HaController",
          "id": "2458918824979981314",
          "creationTimestamp": "2026-11-18T03:58:53.753-07:00",
          "name": "example-hac-1",
          "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/haControllers/example-hac-1",
          "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/haControllers/2458918824979981314",
          "region": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1",
          "instanceName": "example-vm",
          "failoverInitiation": "AUTOMATIC",
          "networkingAutoConfiguration": {
            "internal": {
              "ipAddress": "10.132.15.211",
              "stackType": "IPV4_ONLY"
            }
          },
          "zoneConfigurations": {
            "us-central1-a": {
              "reservationAffinity": {
                "consumeReservationType": "ANY_RESERVATION"
              }
            },
            "us-central1-b": {
              "reservationAffinity": {
                "consumeReservationType": "ANY_RESERVATION"
              }
            }
          },
          "state": "ACTIVE",
          "status": {
            "primaryZone": "us-central1-a",
            "primaryInstance": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/instances/example-vm",
            "ongoingFailover": false,
            "readyForFailover": true,
            "zoneStatus": {
              "us-central1-a": {
                "isPrimary": true,
                "isZoneReady": true
              },
              "us-central1-b": {
                "isPrimary": false,
                "isZoneReady": true
              }
            }
          }
        }
      ],
      "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/haControllers"
    }

### View the details of a high availability controller

To view the configuration and status of a specific high availability controller,
select one of the following options:

### Console

1. In the Google Cloud console, go to the **VM instances** page.

   [Go to VM instances](https://console.cloud.google.com/compute/instances)
2. Click the **High availability controllers** tab. A pane that shows a
   list of high availability controllers in your project appears.

3. In the **Name** column, click the name of the high availability
   controller that you want to view the details of. A page that gives the
   details of the high availability controller appears, and the
   **Overview** tab is selected.

### gcloud

To view the details of a high availability controller, use the [`gcloud
preview compute ha-controllers describe`
command](https://docs.cloud.google.com/sdk/gcloud/reference/preview/compute/ha-controllers/describe):

    gcloud preview compute ha-controllers describe HA_CONTROLLER_NAME \
        --region=REGION

Replace the following:

- `HA_CONTROLLER_NAME`: the name of the high availability
  controller.

- `REGION`: the region where the high availability
  controller exists.

The output is similar to the following:

    creationTimestamp: '2026-11-18T03:58:53.753-07:00'
    failoverInitiation: AUTOMATIC
    id: '2458918824979981314'
    instanceName: example-vm
    kind: compute#HaController
    name: example-hac-1
    networkingAutoConfiguration:
      internal:
        ipAddress: 10.132.15.211
        stackType: IPV4_ONLY
    region: https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1
    selfLink: https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/haControllers/example-hac-1
    selfLinkWithId: https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/haControllers/2458918824979981314
    state: ACTIVE
    status:
      lastFailoverInfo:
        failoverCompleteTimestamp: '2026-11-19T08:32:47.112772Z'
        failoverDuration: 205.024609s
        failoverTrigger: MANUAL
        failoverTriggerTimestamp: '2026-11-19T08:29:22.088163Z'
      ongoingFailover: false
      primaryInstance: https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/instances/example-vm
      primaryZone: us-central1-a
      readyForFailover: true
      zoneStatus:
        us-central1-a:
          isPrimary: true
          isZoneReady: true
        us-central1-b:
          isPrimary: false
          isZoneReady: true
    zoneConfigurations:
      us-central1-a:
        reservationAffinity:
          consumeReservationType: ANY_RESERVATION
      us-central1-b:
        reservationAffinity:
          consumeReservationType: ANY_RESERVATION

The response includes the following fields:

- **`networkingAutoConfiguration.internal.ipAddress`**: the internal IP
  address of the forwarding rule that the high availability controller
  created to route traffic to the active VM. If the high availability
  controller uses automatic network configuration, then this field appears
  in the output.

- **`state`**: the current state of the high availability controller,
  which can be one of the following values:

  - **`ACTIVE`**: the high availability controller is active and ready
    for failover.

  - **`CREATING`**: Compute Engine is creating the high
    availability controller.

  - **`DELETING`**: Compute Engine is deleting the high
    availability controller.

  - **`FAILOVER_IN_PROGRESS`**: a failover is in progress.

  - **`FAILOVER_UNAVAILABLE`**: the high availability controller isn't
    ready for failover or an error occurred during a failover.

  - **`MULTI_ZONE_FAILURE`**: the high availability controller requires
    a failover, but the secondary zone is unavailable.

  - **`PENDING_FAILOVER`**: the high availability controller requires a
    failover operation.

  - **`STARTING`**: Compute Engine is starting the high
    availability controller and reallocating capacity in the secondary
    zone after you start the VM in the primary zone.

  - **`STOPPED`**: the VM in the primary zone and the high availability
    controller are stopped, and the controller holds no capacity in the
    secondary zone.

  - **`STOPPING`**: Compute Engine is stopping the high
    availability controller and releasing capacity in the secondary zone
    after you stop the VM in the primary zone.

  - **`UPDATING`**: Compute Engine is updating the high
    availability controller.

- **`status.lastFailoverInfo`** : details about the most recent completed
  failover. If a failover has occurred, then the `status.lastFailoverInfo`
  field also includes the following fields:

  - **`failoverTriggerTimestamp`**: the start timestamp of the failover.

  - **`failoverCompleteTimestamp`**: the completion timestamp of the
    failover.

  - **`failoverDuration`**: the duration of the failover.

  - **`failoverTrigger`**: the reason for the failover. The value can be
    one of the following:

    - **`AUTOMATIC`** : a zonal outage occurred, or the virtual machine
      (VM) instance remained in the `REPAIRING` state for over 10
      minutes.

    - **`MANUAL`**: a user request triggered the failover.

- **`status.ongoingFailover`** : whether a failover is in progress, either
  `true` or `false`. If a failover is in progress, then the output also
  includes the `status.failoverProgress` field. If the ongoing failover
  encounters an error, then the
  `status.failoverProgress.lastFailoverAttempt` field includes the
  `errors` and `timestamp` fields.

- **`status.primaryInstance`**: the URL of the VM that runs in the primary
  zone.

- **`status.primaryZone`**: the primary zone where the VM runs.

- **`status.readyForFailover`** : whether the high availability controller
  is ready to run a failover to the secondary zone, either `true` or
  `false`.

- **`status.zoneStatus`** : the status of each configured zone, including
  the `isPrimary` field, which indicates whether the zone is the primary
  zone, and the `isZoneReady` field, which indicates whether the zone is
  ready for failover. If an operation in a zone fails, then the zone's
  status also includes the `lastError` field with the `errors` and
  `timestamp` fields.

### REST

To view the details of a high availability controller, make a `GET` request
to the [preview `haControllers.get`
method](https://docs.cloud.google.com/compute/docs/reference/rest/2026-10-01-preview/haControllers/get)
with the `$apiVersion=2026-10-01-preview` query parameter in the request
URL:

    GET https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/regions/REGION/haControllers/HA_CONTROLLER_NAME?$apiVersion=2026-10-01-preview

Replace the following:

- `PROJECT_ID`: the ID of your project.

- `REGION`: the region where the high availability
  controller exists.

- `HA_CONTROLLER_NAME`: the name of the high availability
  controller.

The output is similar to the following:

    {
      "kind": "compute#HaController",
      "id": "2458918824979981314",
      "creationTimestamp": "2026-11-18T03:58:53.753-07:00",
      "name": "example-hac-1",
      "selfLink": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/haControllers/example-hac-1",
      "selfLinkWithId": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1/haControllers/2458918824979981314",
      "region": "https://www.googleapis.com/compute/v1/projects/example-project/regions/us-central1",
      "instanceName": "example-vm",
      "failoverInitiation": "AUTOMATIC",
      "networkingAutoConfiguration": {
        "internal": {
          "ipAddress": "10.132.15.211",
          "stackType": "IPV4_ONLY"
        }
      },
      "zoneConfigurations": {
        "us-central1-a": {
          "reservationAffinity": {
            "consumeReservationType": "ANY_RESERVATION"
          }
        },
        "us-central1-b": {
          "reservationAffinity": {
            "consumeReservationType": "ANY_RESERVATION"
          }
        }
      },
      "state": "ACTIVE",
      "status": {
        "lastFailoverInfo": {
          "failoverCompleteTimestamp": "2026-11-19T08:32:47.112772Z",
          "failoverDuration": "205.024609s",
          "failoverTrigger": "MANUAL",
          "failoverTriggerTimestamp": "2026-11-19T08:29:22.088163Z"
        },
        "ongoingFailover": false,
        "primaryInstance": "https://www.googleapis.com/compute/v1/projects/example-project/zones/us-central1-a/instances/example-vm",
        "primaryZone": "us-central1-a",
        "readyForFailover": true,
        "zoneStatus": {
          "us-central1-a": {
            "isPrimary": true,
            "isZoneReady": true
          },
          "us-central1-b": {
            "isPrimary": false,
            "isZoneReady": true
          }
        }
      }
    }

The response includes the following fields:

- **`networkingAutoConfiguration.internal.ipAddress`**: the internal IP
  address of the forwarding rule that the high availability controller
  created to route traffic to the active VM. If the high availability
  controller uses automatic network configuration, then this field appears
  in the output.

- **`state`**: the current state of the high availability controller,
  which can be one of the following values:

  - **`ACTIVE`**: the high availability controller is active and ready
    for failover.

  - **`CREATING`**: Compute Engine is creating the high
    availability controller.

  - **`DELETING`**: Compute Engine is deleting the high
    availability controller.

  - **`FAILOVER_IN_PROGRESS`**: a failover is in progress.

  - **`FAILOVER_UNAVAILABLE`**: the high availability controller isn't
    ready for failover or an error occurred during a failover.

  - **`MULTI_ZONE_FAILURE`**: the high availability controller requires
    a failover, but the secondary zone is unavailable.

  - **`PENDING_FAILOVER`**: the high availability controller requires a
    failover operation.

  - **`STARTING`**: Compute Engine is starting the high
    availability controller and reallocating capacity in the secondary
    zone after you start the VM in the primary zone.

  - **`STOPPED`**: the VM in the primary zone and the high availability
    controller are stopped, and the controller holds no capacity in the
    secondary zone.

  - **`STOPPING`**: Compute Engine is stopping the high
    availability controller and releasing capacity in the secondary zone
    after you stop the VM in the primary zone.

  - **`UPDATING`**: Compute Engine is updating the high
    availability controller.

- **`status.lastFailoverInfo`** : details about the most recent completed
  failover. If a failover has occurred, then the `status.lastFailoverInfo`
  field also includes the following fields:

  - **`failoverTriggerTimestamp`**: the start timestamp of the failover.

  - **`failoverCompleteTimestamp`**: the completion timestamp of the
    failover.

  - **`failoverDuration`**: the duration of the failover.

  - **`failoverTrigger`**: the reason for the failover. The value can be
    one of the following:

    - **`AUTOMATIC`** : a zonal outage occurred, or the virtual machine
      (VM) instance remained in the `REPAIRING` state for over 10
      minutes.

    - **`MANUAL`**: a user request triggered the failover.

- **`status.ongoingFailover`** : whether a failover is in progress, either
  `true` or `false`. If a failover is in progress, then the output also
  includes the `status.failoverProgress` field. If the ongoing failover
  encounters an error, then the
  `status.failoverProgress.lastFailoverAttempt` field includes the
  `errors` and `timestamp` fields.

- **`status.primaryInstance`**: the URL of the VM that runs in the primary
  zone.

- **`status.primaryZone`**: the primary zone where the VM runs.

- **`status.readyForFailover`** : whether the high availability controller
  is ready to run a failover to the secondary zone, either `true` or
  `false`.

- **`status.zoneStatus`** : the status of each configured zone, including
  the `isPrimary` field, which indicates whether the zone is the primary
  zone, and the `isZoneReady` field, which indicates whether the zone is
  ready for failover. If an operation in a zone fails, then the zone's
  status also includes the `lastError` field with the `errors` and
  `timestamp` fields.

## View audit logs for a high availability controller

Compute Engine writes [audit logs](https://docs.cloud.google.com/compute/docs/logging/audit-logging.md.txt)
for your high availability controllers within the `gce_ha_controller` resource
type:

- **Admin activity audit logs** (`cloudaudit.googleapis.com/activity`): record
  API operations that create, modify, or delete a high availability
  controller, as well as the start, completion, or failure of a failover
  (`compute.haControllers.failover`).

- **System event audit logs** (`cloudaudit.googleapis.com/system_event`):
  record automated state transitions and maintenance events
  (`compute.haControllers.failureDetection`, `compute.haControllers.start`,
  and `compute.haControllers.stop`); for example, when the controller enters a
  specific state or when a repair operation takes longer than 10 minutes.

To view audit logs or receive notifications for high availability controller
events, select one of the following options:

- [View a list of audit logs](https://docs.cloud.google.com/compute/docs/instances/view-ha-controllers.md.txt#view-logs-console)

- [Set up notification alerts for high availability controllers](https://docs.cloud.google.com/compute/docs/instances/view-ha-controllers.md.txt#alerts)

### View a list of audit logs

To view a list of audit logs for a high availability controller by using the
Google Cloud console, complete the following steps:

1. In the Google Cloud console, go to the **VM instances** page.

   [Go to VM instances](https://console.cloud.google.com/compute/instances)
2. Click the **High availability controllers** tab. A pane that shows a list of
   high availability controllers in your project appears.

3. In the **Name** column, click the name of the high availability controller
   that you want to view the details of. A page that gives the details of the
   high availability controller appears, and the **Overview** tab is selected.

4. Click the **Logs** tab. The **Logs** pane displays the audit logs for your
   high availability controller.

5. Optional: To refine your list of logs, in the
   **Filter** field, select the
   properties that you want to filter the logs by.

### Set up notification alerts for high availability controllers

You can use Cloud Logging to create
[log-based alerting policies](https://docs.cloud.google.com/logging/docs/alerting/log-based-alerts.md.txt) in
[Logs Explorer](https://docs.cloud.google.com/logging/docs/view/logs-explorer-interface.md.txt). These policies
notify you when a high availability controller detects an unhealthy VM, starts
or completes a failover, or can't fail over.

To create an alert for high availability controller events, complete the
following steps. Repeat this procedure for each alert that you want to create.

1. In the Google Cloud console, go to the

   **Logs Explorer** page:

   [Go to **Logs Explorer**](https://console.cloud.google.com/logs/query)

   <br />

   If you use the search bar to find this page, then select the result whose subheading is
   **Logging**.
2. Click the **Show query** toggle to the on position.

3. In the **Query** pane, enter one of the following queries. Each query
   matches all high availability controllers in your project.

   - To receive alerts when a high availability controller detects an
     unhealthy VM and enters the `PENDING_FAILOVER` state:

         resource.type="gce_ha_controller"
         log_id("cloudaudit.googleapis.com/system_event")
         protoPayload.metadata.data.state="PENDING_FAILOVER"

   - To receive alerts when a failover starts:

         resource.type="gce_ha_controller"
         log_id("cloudaudit.googleapis.com/activity")
         protoPayload.methodName:"compute.haControllers.failover"
         operation.first=true

   - To receive alerts when a failover completes:

         resource.type="gce_ha_controller"
         log_id("cloudaudit.googleapis.com/activity")
         protoPayload.methodName:"compute.haControllers.failover"
         protoPayload.metadata.details.data.failoverStatus="COMPLETED"

   - To receive alerts when a failover fails or is canceled:

         resource.type="gce_ha_controller"
         log_id("cloudaudit.googleapis.com/activity")
         protoPayload.methodName:"compute.haControllers.failover"
         (protoPayload.metadata.details.data.failoverStatus="FAILED" OR
           protoPayload.metadata.details.data.failoverStatus="ABORTED")

   - To receive alerts when the secondary zone isn't ready for failover or
     when a multi-zone failure occurs:

         resource.type="gce_ha_controller"
         log_id("cloudaudit.googleapis.com/system_event")
         (protoPayload.metadata.data.state="FAILOVER_UNAVAILABLE" OR
           protoPayload.metadata.data.state="MULTI_ZONE_FAILURE")

4. To validate the query, click **Run query** . If the query is valid, then the
   **Query results** pane displays log entries that match the query.

5. In the **Query results** toolbar, click the **Actions** list, and then
   select **Create log alert** .
   The **Create logs-based alert policy** pane appears.

6. In the **Alert details** section, complete the following steps:

   1. In the **Alert Policy Name** field, enter a name for the policy.

   2. In the **Policy severity level** list, select **Warning** (or a higher
      severity).

   3. Click **Next**.

7. In the **Choose logs to include in the alert** section, click **Next**.

8. In the **Set notification frequency and autoclose duration** section,
   specify the following values:

   1. In the **Time between notifications** list, select how often you want to
      receive notifications.

   2. In the **Incident autoclose duration** list, select the duration after
      which Logging stops notifications and closes the
      incident.

   3. Click **Next**.

9. In the **Who should be notified?** section, specify a
   [notification channel](https://docs.cloud.google.com/monitoring/support/notification-options.md.txt) where
   Logging sends notifications.

10. Click **Save**.

To receive alerts for scheduled host maintenance events on the primary VM, see
[Configure alerts for host maintenance notifications](https://docs.cloud.google.com/compute/docs/instances/monitor-plan-host-maintenance-event.md.txt#alerts).

## What's next

- [Create a high availability controller](https://docs.cloud.google.com/compute/docs/instances/create-ha-controller.md.txt)

- [Trigger a failover for a high availability controller](https://docs.cloud.google.com/compute/docs/instances/trigger-ha-controller-failover.md.txt)

- [Modify a high availability controller](https://docs.cloud.google.com/compute/docs/instances/modify-ha-controller.md.txt)

- [Delete a high availability controller](https://docs.cloud.google.com/compute/docs/instances/delete-ha-controller.md.txt)