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.
Before you begin
-
If you haven't already, set up authentication.
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
-
Install the Google Cloud CLI, and then sign in to the gcloud CLI with your federated identity. After signing in, initialize the Google Cloud CLI by running the following command:
gcloud init - Set a default region and zone.
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.
Install the Google Cloud CLI, and then sign in to the gcloud CLI with your federated identity.
For more information, see Authenticate for using REST 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 (
roles/compute.viewer) -
To view audit logs for a high availability controller:
Logs Viewer (
roles/logging.viewer) -
To set up notification alerts:
- Monitoring AlertPolicy Editor (
roles/monitoring.alertPolicyEditor) - Monitoring NotificationChannel Editor (
roles/monitoring.notificationChannelEditor) - Logs Configuration Writer (
roles/logging.configWriter)
- Monitoring AlertPolicy Editor (
For more information about granting roles, see Manage access to projects, folders, and organizations.
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 or other predefined roles.
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
To view a list of high availability controllers in your project, select one of the following options:
Console
In the Google Cloud console, go to the VM instances page.
Click the High availability controllers tab. A pane that shows a list of high availability controllers in your project appears.
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.
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 listView a list of high availability controllers in specific regions:
gcloud preview compute ha-controllers list \ --regions=REGION_LISTReplace
REGION_LISTwith 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
GETrequest to the previewhaControllers.aggregatedListmethod with the$apiVersion=2026-10-01-previewquery parameter in the request URL:GET https://compute./compute/v1/projects/PROJECT_ID/aggregated/haControllers?$apiVersion=2026-10-01-previewTo view a list of high availability controllers in a specific region, make a
GETrequest to the previewhaControllers.listmethod with the$apiVersion=2026-10-01-previewquery parameter in the request URL:GET https://compute./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
In the Google Cloud console, go to the VM instances page.
Click the High availability controllers tab. A pane that shows a list of high availability controllers in your project appears.
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:
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 thestatus.lastFailoverInfofield 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 theREPAIRINGstate for over 10 minutes.MANUAL: a user request triggered the failover.
status.ongoingFailover: whether a failover is in progress, eithertrueorfalse. If a failover is in progress, then the output also includes thestatus.failoverProgressfield. If the ongoing failover encounters an error, then thestatus.failoverProgress.lastFailoverAttemptfield includes theerrorsandtimestampfields.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, eithertrueorfalse.status.zoneStatus: the status of each configured zone, including theisPrimaryfield, which indicates whether the zone is the primary zone, and theisZoneReadyfield, which indicates whether the zone is ready for failover. If an operation in a zone fails, then the zone's status also includes thelastErrorfield with theerrorsandtimestampfields.
REST
To view the details of a high availability controller, make a GET request
to the preview haControllers.get
method
with the $apiVersion=2026-10-01-preview query parameter in the request
URL:
GET https://compute./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 thestatus.lastFailoverInfofield 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 theREPAIRINGstate for over 10 minutes.MANUAL: a user request triggered the failover.
status.ongoingFailover: whether a failover is in progress, eithertrueorfalse. If a failover is in progress, then the output also includes thestatus.failoverProgressfield. If the ongoing failover encounters an error, then thestatus.failoverProgress.lastFailoverAttemptfield includes theerrorsandtimestampfields.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, eithertrueorfalse.status.zoneStatus: the status of each configured zone, including theisPrimaryfield, which indicates whether the zone is the primary zone, and theisZoneReadyfield, which indicates whether the zone is ready for failover. If an operation in a zone fails, then the zone's status also includes thelastErrorfield with theerrorsandtimestampfields.
View audit logs for a high availability controller
Compute Engine writes audit logs
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, andcompute.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
To view a list of audit logs for a high availability controller by using the Google Cloud console, complete the following steps:
In the Google Cloud console, go to the VM instances page.
Click the High availability controllers tab. A pane that shows a list of high availability controllers in your project appears.
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.
Click the Logs tab. The Logs pane displays the audit logs for your high availability controller.
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 in Logs Explorer. 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.
-
In the Google Cloud console, go to the Logs Explorer page:
If you use the search bar to find this page, then select the result whose subheading is Logging.
Click the Show query toggle to the on position.
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_FAILOVERstate: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=trueTo 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")
To validate the query, click Run query. If the query is valid, then the Query results pane displays log entries that match the query.
In the Query results toolbar, click the Actions list, and then select Create log alert. The Create logs-based alert policy pane appears.
In the Alert details section, complete the following steps:
In the Alert Policy Name field, enter a name for the policy.
In the Policy severity level list, select Warning (or a higher severity).
Click Next.
In the Choose logs to include in the alert section, click Next.
In the Set notification frequency and autoclose duration section, specify the following values:
In the Time between notifications list, select how often you want to receive notifications.
In the Incident autoclose duration list, select the duration after which Logging stops notifications and closes the incident.
Click Next.
In the Who should be notified? section, specify a notification channel where Logging sends notifications.
Click Save.
To receive alerts for scheduled host maintenance events on the primary VM, see Configure alerts for host maintenance notifications.