Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Cette page explique comment résoudre les problèmes que vous pouvez rencontrer lors de l'évaluation des charges de travail à l'aide du gestionnaire de charges de travail.
Les notifications sont désactivées pour la première évaluation d'un projet
Lorsque vous créez la première évaluation d'un projet Google Cloud à l'aide de Workload Manager, vous pouvez constater que les cases à cocher de notification d'événement sont désactivées dans la section Notifications. Le message suivant peut également s'afficher:
Selection unavailable until metrics exist in the current project.
Ce problème survient, car le compte de service Workload Manager ne dispose pas des autorisations requises pour envoyer des métriques à Cloud Monitoring dans le projet à partir duquel vous exécutez l'évaluation.
Si vous créez la première évaluation d'un projet, créez-la sans notifications d'événement. Si votre projet contient au moins une évaluation, procédez comme suit:
Autorisez le compte de service Workload Manager à envoyer des métriques à votre projet.
Dans le panneau de navigation de la console Google Cloud , cliquez sur IAM et administration, puis sélectionnez IAM:
Vous trouverez la PROJECT_NUMBER de votre projet Google Cloud sur la page Paramètres du projet.
Pour en savoir plus, consultez Identifier des projets.
Pour modifier les rôles du compte de service, cliquez sur editModifier le compte principal sur la ligne contenant le nom du compte de service, puis sur addAjouter un autre rôle.
Si le compte de service ne figure pas sur la page Autorisations, saisissez manuellement son nom:
Cliquez sur person_addAccorder l'accès, puis saisissez l'adresse e-mail du compte de service Workload Manager au format suivant:
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Difficile à comprendre","hardToUnderstand","thumb-down"],["Informations ou exemple de code incorrects","incorrectInformationOrSampleCode","thumb-down"],["Il n'y a pas l'information/les exemples dont j'ai besoin","missingTheInformationSamplesINeed","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[],[],null,["# Troubleshoot Evaluations\n\nThis page shows you how to resolve issues that you might encounter while\nevaluating workloads using Workload Manager.\n\nNotifications are disabled for the first evaluation in a project\n----------------------------------------------------------------\n\nWhen you create the first evaluation in a Google Cloud project\nusing Workload Manager, you might notice that the event notification\ncheckboxes are disabled in the **Notifications** section. You can also see\nthe following message: \n\n```\nSelection unavailable until metrics exist in the current project.\n```\n\nThis issue occurs because the Workload Manager service account does not\nhave the required permissions to send metrics to Cloud Monitoring in the\nproject from where you run the evaluation.\n\nIf you're creating the first evaluation in a project, then create the evaluation\nwithout event notifications. If you have at least one evaluation in the project,\nthen do the following:\n\n1. Authorize the Workload Manager service account to send metrics to your project.\n\n 1. In the navigation panel of the Google Cloud console,\n click **IAM \\& Admin** and then select **IAM**:\n\n [Go to IAM](https://console.cloud.google.com/iam-admin/iam)\n 2. Select the project in which you're creating the evaluation.\n\n 3. To see the Google-managed service accounts on the **Permissions** page,\n select the **Include Google-provided role grants** checkbox.\n\n 4. Search for the Workload Manager service account that has the\n following format:\n\n \u003cbr /\u003e\n\n ```\n service-PROJECT_NUMBER@gcp-sa-workloadmanager.iam.gserviceaccount.com\n ```\n\n \u003cbr /\u003e\n\n You can find the \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e of your\n Google Cloud project on the **Project settings** page.\n For more information, see [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects).\n 5. To modify roles for the service account, click edit **Edit principal** in the row that\n contains the service account name, and\n click add **Add another role**.\n\n 6. If the service account is not listed on the **Permissions** page,\n manually enter the service account name:\n\n 1. Click person_add\n **Grant Access**, and then enter the email address of the Workload Manager\n service account in the following format:\n\n \u003cbr /\u003e\n\n ```\n service-PROJECT_NUMBER@gcp-sa-workloadmanager.iam.gserviceaccount.com\"\n ```\n\n \u003cbr /\u003e\n\n 2. Click **Select a role**.\n\n2. Assign the following roles to the service account:\n\n - Service Usage Consumer ([`roles/serviceusage.serviceUsageConsumer`](/iam/docs/understanding-roles#serviceusage.serviceUsageConsumer))\n - Monitoring Metric Writer ([`roles/monitoring.metricWriter`](/iam/docs/understanding-roles#monitoring.metricWriter))\n3. Run an evaluation and wait for completion.\n\n After successful completion of the evaluation, Workload Manager sends\n metrics to the project, and then you can [set alerts for the evaluations](/workload-manager/docs/create-evaluation#notifications)."]]