המלצות כלליות לגבי הוצאה משימוש ושינויי תוכנה שעלולים לגרום לכשל ב-Cloud
המלצות כלליות לגבי הוצאה משימוש ושינויי תוכנה שעלולים לגרום לכשל ב-Cloud: המלצות לגבי הוצאה משימוש ושינויי תוכנה שעלולים לגרום לכשל ב-Cloud. הוא מזהה משאבים בענן שיושפעו מהוצאות משימוש ומשינויי תוכנה שעלולים לגרום לכשל, ומספק הנחיות לניהול שלהם. אפשר לראות את ההמלצות דרך Google Cloud CLI, ה-API ו-BigQuery Export.
לפני שמתחילים
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Recommender API, if it is not already enabled.
Roles required to enable APIs
To enable APIs, you need the
serviceusage.services.enablepermission. If you created the project, then you likely already have this permission through the Owner role (roles/owner). Otherwise, you can get this permission through the Service Usage Admin role (roles/serviceusage.serviceUsageAdmin). Learn how to grant roles.
- מוודאים שיש לכם את התפקידים הבאים:
| תיאור | תפקידים |
|---|---|
| לצפייה בהמלצות |
recommender.cloudDeprecationRecommendationViewer
|
| צפייה בהמלצות ועדכון שלהן |
recommender.cloudDeprecationRecommendationAdmin
|
התפקידים הנדרשים
בקטע הזה מתוארים התפקידים וההרשאות שנדרשים כדי להשתמש בהמלצות הכלליות בנושא הוצאה משימוש ושינויים שעלולים לגרום לכשל ב-Cloud.
| תפקיד | ההרשאות הכלולות |
|---|---|
| roles/recommender.cloudDeprecationRecommendationViewer |
|
| roles/recommender.cloudDeprecationRecommendationAdmin |
|
למידע נוסף על תפקידים ועל מתן גישה, ראו:
תמחור
המלצות כלליות לגבי הוצאה משימוש ושינויי תוכנה שעלולים לגרום לכשל ב-Cloud מוצעות בחינם. למידע על רמות תמחור אחרות, ראו התמחור של שירות ההמלצות.
הצגת המלצות להוצאה משימוש בענן
אפשר להציג את רשימת ההמלצות באמצעות מסוף Google Cloud, Google Cloud CLI, Recommender API או באמצעות ייצוא ל-BigQuery.
המסוף
נכנסים אל Active Assist.
מגדירים את סוג המסנן כ-
Recommender:google.cloud.deprecation.GeneralRecommender.
Google Cloud CLI
בכרטיסייה הזו מוצגות הפקודות להצגת רשימה של המלצות ותובנות באמצעות Google Cloud CLI.
הצגת רשימת ההמלצות
gcloud recommender recommendations list \ --billing-project=BILLING_PROJECT_ID \ --project=PROJECT_ID \ --location=LOCATION \ --recommender=google.cloud.deprecation.GeneralRecommender \ --format=yamlתובנות לגבי הרשימה
gcloud recommender insights list \ --billing-project=BILLING_PROJECT_ID \ --project=PROJECT_ID \ --location=LOCATION \ --insight-type=google.cloud.deprecation.GeneralInsight \ --format=yaml
מחליפים את מה שכתוב בשדות הבאים:
- BILLING_PROJECT_ID במזהה הפרויקט שהפעלתם באמצעות Recommender API.
- PROJECT_ID במזהה הפרויקט ב- Google Cloud .
- LOCATION עם Google Cloud המיקום שבו נמצאים המשאבים שמשויכים להמלצות (לדוגמה, global או us-central1-a).
API
בכרטיסיות האלה מוצגות הפקודות להצגת רשימה של המלצות ותובנות באמצעות Recommender API.
המלצות לרשימות
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "x-goog-user-project: BILLING_PROJECT_ID" \ "https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/recommenders/google.cloud.deprecation.GeneralRecommender/recommendations"תובנות לגבי הרשימה
curl -H "Authorization: Bearer $(gcloud auth print-access-token)" \ -H "x-goog-user-project: BILLING_PROJECT_ID" \ "https://recommender.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/insightTypes/google.cloud.deprecation.GeneralInsight/insights"
מחליפים את מה שכתוב בשדות הבאים:
- BILLING_PROJECT_ID במזהה הפרויקט שהפעלתם באמצעות Recommender API.
- PROJECT_ID במזהה הפרויקט ב- Google Cloud .
- LOCATION עם Google Cloud המיקום שבו נמצאים המשאבים שמשויכים להמלצות (לדוגמה, global או us-central1-a).
ייצוא ל-BigQuery
בכרטיסייה הזו מוצגות הפקודות להצגת רשימת ההמלצות באמצעות ייצוא ל-BigQuery.
ההמלצות להוצאה משימוש ב-Cloud נכללות גם בייצוא ל-BigQuery. בעזרת BigQuery Export, אתם יכולים לראות תמונות מצב יומיות של ההמלצות לארגון שלכם.
כדי לייצא המלצות ל-BigQuery, פועלים לפי התיעוד של BigQuery Export.
שאילתה על כל ההמלצות להוצאה משימוש:
SELECT * FROM `<project>.<dataset>.recommendations_export` WHERE DATE(_PARTITIONTIME) = "<date>" and recommender = "google.cloud.deprecation.GeneralRecommender"
סוגי משנה זמינים של המלצות
בטבלה הבאה מתוארים סוגי המשנה של ההמלצות שאפשר לחשוף.
| סוג משנה | הוצאה משימוש או שינוי תוכנה שעלול לגרום לכשל? |
|---|---|
| GCE_METADATA_SERVER_HEADER_WHITESPACE | כדי להתאים ל-RFC 7230, סעיף 3.2, ב-Compute Engine ייאכפו בדיקות של פורמט בקשות ה-HTTP בשירות המטא-נתונים של Compute Engine, כי קבלת בקשות בפורמט שגוי עלולה להוביל לפרצות אבטחה. |
שימו לב: הטבלה הזו לא מקיפה, ויכול להיות שהושמטו ממנה בכוונה הוצאות משימוש או שינויי תוכנה שעלולים לגרום לכשל שרגישים מבחינת אבטחה.