Come best practice, crea i backup utilizzando la pianificazione automatica. Tuttavia, può
essere difficile tenere traccia dello stato di questi backup creati automaticamente. Hai due opzioni:
Visualizza periodicamente l'elenco delle risorse Backup, cercando i backup appena non riusciti.
Configura un avviso per ricevere una notifica quando l'esecuzione del backup non riesce.
Prima di configurare un criterio di avviso, assicurati di disporre di un
canale di notifica appropriato.
Crea un avviso
Per creare criteri di avviso basati su log generali, vedi Configurazione degli avvisi basati su log.
In alternativa, per creare un criterio di avviso specifico per i backup non riusciti di Backup per GKE:
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-01 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."]]