As a best practice, create backups using automatic scheduling. However, it can
be challenging to keep track of the status for these automatically created
backups. You have two choices:
Periodically view the list of Backup resources, looking for newly failed backups.
Set up an alert to notify you when backup execution fails.
Before setting up an alert policy, ensure you have an
appropriate notification channel.
Create an alert
To create general log-based alert policies, see Configure log-based alerts.
Or, to create an alert policy specifically for Backup for GKE failed backups:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Set up alerts for failed backups\n\nAutopilot Standard\n\n*** ** * ** ***\n\nThis page describes how to configure the system so that you will receive alerts\nwhen Backup for GKE backups fail.\n\nYou can create backups in two different ways:\n\n- By [manually creating](/kubernetes-engine/docs/add-on/backup-for-gke/how-to/backup#manual) a `Backup` resource.\n- By configuring a schedule when [creating your `BackupPlan` resource](/kubernetes-engine/docs/add-on/backup-for-gke/how-to/backup-plan#create_a_backup_plan).\n\nAs a best practice, create backups using automatic scheduling. However, it can\nbe challenging to keep track of the status for these automatically created\nbackups. You have two choices:\n\n- Periodically [view](/kubernetes-engine/docs/add-on/backup-for-gke/how-to/backup#view_a_backup) the list of `Backup` resources, looking for newly failed backups.\n- Set up an alert to notify you when backup execution fails.\n\nThis page describes how to configure an alert policy based on [log events emitted by Backup for GKE](/kubernetes-engine/docs/add-on/backup-for-gke/how-to/platform-logging-backup-for-gke) and viewable from the\n[Logs Explorer](/logging/docs/view/logs-explorer-interface).\n\nBefore you begin\n----------------\n\nBefore setting up an alert policy, ensure you have an\nappropriate [notification channel](/monitoring/support/notification-options).\n\nCreate an alert\n---------------\n\nTo create general log-based alert policies, see [Configure log-based alerts](/logging/docs/alerting/log-based-alerts).\nOr, to create an alert policy specifically for Backup for GKE failed backups:\n\n1. Go to the Logs Explorer page\n\n [Go to Logs Explorer](https://console.cloud.google.com/logs/query)\n2. Enter the following filter criteria in the **Query** pane:\n\n logName=\"projects/\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e/logs/gkebackup.googleapis.com%2Fbackup_change\"\n resource.type=\"gkebackup.googleapis.com/BackupPlan\"\n resource.labels.backup_plan_id=\"\u003cvar translate=\"no\"\u003eBACKUP_PLAN\u003c/var\u003e\"\n resource.labels.location=\"\u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e\"\n jsonPayload.changeType=\"UPDATE\"\n jsonPayload.inputBackup.state=\"FAILED\"\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of your Google Cloud project.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the [compute region](/compute/docs/regions-zones#available) of the backup plan for which you want to generate alerts.\n - \u003cvar translate=\"no\"\u003eBACKUP_PLAN\u003c/var\u003e: the name of the backup plan for which you want to generate alerts.\n\n | **Note:** This creates an alert policy for any failed backups of a specific backup plan. If you want to create a single policy for all failed backups, omit the `resource.labels.backup_plan_id` and `resource.labels.location` fields.\n3. Click the **Create alert** label below the **Query** pane.\n\n4. Enter a meaningful name for your alert policy and any documentation you\n want to make available to recipients of alerts.\n\n5. Click **Next** twice.\n\n6. Set the appropriate notification frequency and autoclose duration. We\n suggest `5 min` and `7 days`.\n\n7. Click **Next**.\n\n8. Select the appropriate notification channels and save your alert\n policy.\n\nAfter you save the policy, you receive alerts to your notification channels when\na backup matching your filter fails."]]