Arbeitslasten mit benutzerdefinierten Regeln bewerten
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In diesem Dokument wird beschrieben, wie Sie benutzerdefinierte Regeln in Workload Manager verwenden, um Ihre Arbeitslasten anhand von Best Practices zu bewerten, die für Ihre Organisation empfohlen werden.
Wählen Sie in der Regeltabelle die benutzerdefinierten Regeln aus, anhand derer die ausgewählten Ressourcen validiert werden sollen.
Wählen Sie im Bereich Bereich und Filter die Ressourcen aus, die in die Bewertung einbezogen werden sollen.
Klicken Sie auf Bereiche durchsuchen und wählen Sie die Organisationen, Ordner oder Projekte aus, in denen Sie die Auswertung ausführen möchten.
Optional: Verwenden Sie im Bereich Filter auf Ressourcen anwenden Filter, um nur bestimmte Ressourcen auszuwählen.
Wählen Sie im Abschnitt Speicherort für Auswertungsdaten die Regionen aus, in denen Workload Manager die Auswertungsdaten speichern soll.
Klicken Sie auf Weiter.
Führen Sie im Abschnitt Häufigkeit und Benachrichtigung folgende Schritte aus:
Optional: Wenn Sie die Bewertungsergebnisse in ein BigQuery-Dataset exportieren möchten, wählen Sie In BigQuery-Dataset speichern aus und geben Sie den Namen des Datasets an.
Optional: Wenn Sie für jede Bewertung eine separate Tabelle erstellen möchten, klicken Sie auf Neue Ergebnistabelle für diese Bewertung erstellen.
Optional: Wenn Sie Auswertungsdaten mit vom Kunden verwalteten Verschlüsselungsschlüsseln (Customer-Managed Encryption Keys, CMEK) verschlüsseln möchten, klicken Sie auf Verschlüsselung und geben Sie für jede Region einen Verschlüsselungsschlüssel an. Weitere Informationen finden Sie unter Vom Kunden verwaltete Verschlüsselungsschlüssel für Auswertungen aktivieren.
Klicken Sie auf Weiter.
Wählen Sie im Bereich Bewertungsbereich die Ressourcen aus, die in die Bewertung einbezogen werden sollen.
Klicken Sie auf Bereiche durchsuchen und wählen Sie die Organisationen, Ordner oder Projekte aus, in denen Sie die Auswertung ausführen möchten.
Optional: Verwenden Sie im Bereich Filter auf Ressourcen anwenden Filter, um nur bestimmte Ressourcen auszuwählen.
Klicken Sie auf Weiter.
Wählen Sie im Bereich Bewertungsregeln die benutzerdefinierten Regeln aus, anhand derer die ausgewählten Ressourcen validiert werden sollen.
Wählen Sie im Bereich Planung die Häufigkeit aus, mit der die Analyse ausgeführt werden soll.
Klicken Sie auf Weiter.
Wählen Sie im Bereich Benachrichtigungen den Benachrichtigungskanal und die Ereignisse aus, zu denen Sie Benachrichtigungen erhalten möchten.
Klicken Sie auf Weiter.
Prüfen Sie die Einstellungen für die Bewertung und klicken Sie dann auf Erstellen.
Bewertung ausführen
So führen Sie eine Arbeitslastbewertung aus:
Rufen Sie in der Google Cloud Console die Seite Workload Manager auf.
Klicken Sie auf der Seite Arbeitslastinformationen auf Ausführen. Die Bewertung einer Arbeitslast dauert einige Minuten. Es kann vorkommen, dass Bewertungen aufgrund der Zeit, die eine Bewertung benötigt, nicht in Echtzeit ermittelt werden.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-09 (UTC)."],[],[],null,["# Evaluate your workloads using custom rules\n\nThis document describes how to use custom rules in Workload Manager to evaluate\nyour workloads against best practices recommended for your organization.\n\nFor more information, see [About custom rules in Workload Manager](/workload-manager/docs/evaluate/custom-rules/about-custom-rules).\n\nBefore you begin\n----------------\n\n- [Create custom rules using Rego](/workload-manager/docs/evaluate/custom-rules/rego-custom-rules) and upload rules to a Cloud Storage bucket.\n- Enable the following APIs in your Google Cloud project where you create and run the evaluation:\n - Service Usage API\n - Cloud Monitoring API\n\n### Required roles\n\nFor more information about the required IAM roles, see [required permissions\nto create and run an evaluation](/workload-manager/docs/roles#summary_of_required_permissions_to_create_and_run_an_evaluation).\n\nEvaluate workloads using custom rules\n-------------------------------------\n\nTo create a workload evaluation using custom rules, follow these steps:\n\n1. In the Google Cloud console, go to the **Workload Manager** page.\n\n Go to [Workload Manager](https://console.cloud.google.com/workload-manager)\n2. Select a Google Cloud project.\n\n3. If prompted, to enable the required API for Workload Manager, click **Enable**.\n\n4. Click add**New evaluation**.\n\n5. In the **Evaluation details** section, do the following:\n\n 1. For **Evaluation name**, enter a name for the workload evaluation.\n 2. For **Workload type** , select **Custom**.\n 3. Select the Cloud Storage bucket containing the custom rules.\n\n You can use the sample rules available in the [GoogleCloudPlatform/workload-manager](https://github.com/GoogleCloudPlatform/workload-manager)\n GitHub repository or build your own rules and upload them to the Cloud Storage bucket.\n For more information, see [Write custom rules using Rego](/workload-manager/docs/evaluate/custom-rules/rego-custom-rules).\n 4. In the **Location for evaluation data** section, select the **Regions**\n where you want Workload Manager to store the evaluation data.\n\n 5. Optional: To export evaluation results to a BigQuery dataset,\n select **Save evaluation results to BigQuery dataset**, and then\n specify the name of the dataset.\n\n | **Note:** Ensure that the BigQuery dataset is regional. Workload Manager doesn't support exporting data to multi-region datasets. You must also create and use a dataset in the same region as the one you selected for evaluation in the previous step. If your organization uses a [Resource Location Restriction](/resource-manager/docs/organization-policy/defining-locations) policy, then create a BigQuery dataset in one of the allowed regions and [Workload Manager supported regions](/workload-manager/docs/evaluate/locations).\n 6. Optional: To create a separate table for each evaluation, click **Create a new results table for this evaluation**.\n\n 7. Optional: To encrypt evaluation data with customer-managed encryption keys (CMEK),\n click **Encryption** and provide an encryption key for each region. For more\n information, see [Enable customer-managed encryption keys for evaluations](/workload-manager/docs/evaluate/custom-rules/enable-cmek).\n\n6. Click **Continue**.\n\n7. In the **Evaluation scope** section, select the resources that you want to\n include in the evaluation.\n\n 1. Click **Browse scopes** and select the organizations, folders, or projects in which you want to run the evaluation.\n 2. Optional: In the **Apply filters to resources** section, use filters to only select specific resources.\n8. Click **Continue**.\n\n9. In the **Evaluation rules** section, select the custom rules you want to validate\n the selected resources against.\n\n10. In the **Scheduling** section, select the frequency at which you want the evaluation to run.\n\n11. Click **Continue**.\n\n12. In the **Notifications** section, select the notification channel and select\n the events for which you want to receive notifications.\n\n13. Click **Continue**.\n\n14. Review the evaluation settings, and then click **Create**.\n\nRun the evaluation\n------------------\n\nTo run a workload evaluation, follow these steps:\n\n1. In the Google Cloud console, go to the **Workload Manager** page.\n\n Go to [Workload Manager](https://console.cloud.google.com/workloads?walkthrough_id=workload-manager--create-evaluation).\n2. Click the **Evaluation name**.\n\n3. On the **Evaluation information** page, click **Run**. A workload evaluation\n takes a few minutes to complete. There might be evaluations that aren't\n completely real-time due to the time it takes for an evaluation to complete.\n\nWhat's next\n-----------\n\n- Learn more [about workload evaluations](/workload-manager/docs/about-evaluations)."]]