הפחתת עלויות הרישום ביומן
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
אחרי שמפעילים את הרישום ביומן, אתם אחראים להגדיר את האופן שבו רוצים לנתב, לאחסן ולשמור את היומנים. אם תחרגו מהמגבלות ללא חיוב על שימוש ושימור ביומן, ייתכן שתצברו עלויות נוספות ב-Google Cloud על הטמעת יומנים ושימור שלהם. מחירון של Google Cloud Observability
עם זאת, אפשר לשלוט בעלויות הרישום ביומן באמצעות אחת מהגישות הבאות שמתוארות בקטעים הבאים.
צמצום השימוש ברישום ביומן
אפשר להגביל את כמות נתוני היומן שסופחים על ידי החרגת רשומות מסוימות ביומן. אפשר לעיין במאמרים החרגות ב-Cloud Logging והחרגת יומנים.
דוגמה: הפקודה הבאה מעדכנת את הקטגוריה של הרישום ביומן _Default
כך שתחרוג מהיומנים של GetVehicle
.
gcloud logging sinks update _Default \
--add-exclusion=name=get-vehicle,filter='jsonPayload.@type:"type.googleapis.com/maps.fleetengine.v1.GetVehicleLog"'
ייצוא או ניתוב של יומנים
כדי להימנע מעלות ברירת המחדל של הטמעה ואחסון, אפשר לנתב יומנים ליעדים אחרים ב-Google Cloud או ליעדים חיצוניים. כדי להימנע מהעלויות של הטמעת הנתונים, חשוב להשבית את הטמעת היומנים כפי שמתואר בקטע הבא.
אפשר לעיין במאמרים ייצוא של Cloud Logging וייצוא יומנים.
השבתת הטמעת יומנים
אם אתם לא מתכוונים להשתמש ביומני Fleet Engine, תוכלו להימנע מחיובים פוטנציאליים ב-Cloud Logging על ידי השבתת הטמעת הנתונים. כברירת מחדל, יומני Fleet Engine מנותבים לקטגוריית היומנים _Default.
הפקודה הבאה מעדכנת את הקטגוריה _Default לתיעוד ביומן כך שלא תתבצע הטמעה של יומני Fleet Engine.
gcloud logging sinks update _Default \
--log-filter='NOT LOG_ID("cloudaudit.googleapis.com/activity") \
AND NOT LOG_ID("externalaudit.googleapis.com/activity") \
AND NOT LOG_ID("cloudaudit.googleapis.com/system_event") \
AND NOT LOG_ID("externalaudit.googleapis.com/system_event") \
AND NOT LOG_ID("cloudaudit.googleapis.com/access_transparency") \
AND NOT LOG_ID("externalaudit.googleapis.com/access_transparency") \
AND NOT resource.type:"fleetengine.googleapis.com"'
כדאי לעיין גם במאמר ארבעה שלבים לניהול העלויות של Cloud Logging בהתאם לתקציב.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-01-14 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2025-01-14 (שעון UTC)."],[[["When logging is enabled, you are responsible for routing, storage, and retention, which might incur extra Google Cloud costs if usage and retention limits for no charge are exceeded."],["You can reduce logging costs by limiting ingested data, excluding specific log entries, routing logs to other destinations, or turning off log ingestion entirely."],["If you choose to route logs to external destinations, ensure to turn off log ingestion to avoid extra charges."],["To completely avoid Fleet Engine logging charges when you don't intend to use the logs, turn off ingestion for the _Default log bucket."]]],["After enabling logging, you can manage costs by controlling log ingestion and retention. To reduce costs, limit ingested data by excluding specific log entries, like `GetVehicle` logs, using commands such as `gcloud logging sinks update`. You can also route logs to other destinations, avoiding default storage costs, by using Cloud Logging Exports. To completely prevent charges, you can turn off log ingestion using the provided command to update the `_Default` logging bucket to ignore specified logs including `fleetengine.googleapis.com`.\n"]]