存取 Cloud Storage 中的監控資料

本頁面說明如何存取 Cloud Storage bucket 的監控資料,包括要求率和頻寬用量。如要瞭解如何在 Cloud Storage 中進行監控,以及使用哪些指標尋找所需資料,請參閱「監控總覽」或「頻寬用量監控總覽」。

監控個別值區的資料

  1. 前往 Google Cloud 控制台的「Cloud Storage bucket」頁面。

    前往「Buckets」(值區) 頁面

  2. 在值區清單中,找出您要查看監控資料的值區,然後點選該值區名稱。

  3. 在「Bucket details」(值區詳細資料) 頁面中,按一下「Observability」(可觀測性) 分頁標籤。

    系統會顯示監控圖表。

監控專案中所有值區的資料

  1. 前往 Google Cloud 控制台的「Cloud Storage bucket」頁面。

    前往「Buckets」(值區) 頁面

  2. 在「Cloud Storage」導覽窗格中,按一下「監控」

    系統會顯示監控圖表。

您也可以使用下列網址直接存取「監控」頁面:

https://console.cloud.google.com/storage/monitoring?project=PROJECT_ID

其中 PROJECT_ID 是您要監控指標的專案 ID。

監控頻寬用量

事前準備

如要追蹤頻寬監控作業:

如要監控頻寬用量,請按照下列步驟操作:

控制台

您可以在「配額與系統限制」頁面中,使用適當的指標查看專案的 bucket 輸出頻寬用量。如要瞭解頻寬監控指標和傳回的資料,請參閱「頻寬監控指標」。

開啟 Cloud Storage 配額與系統限制

  • 每個區域每秒的 Google 輸出頻寬

  • 每個雙區域位置每秒每個區域的雙區域 Google 輸出頻寬

  • 每個區域每秒的多區域 Google 輸出頻寬

  • 每個區域每秒的網際網路輸出頻寬

  • 每個雙區域位置的每個區域每秒雙區域網際網路輸出頻寬

  • 每個區域每秒的多區域網際網路輸出頻寬

您也可以在Cloud Storage 監控頁面,查看專案中位於各區域的值區 Google 輸出頻寬用量。

如要進一步瞭解如何查看及管理配額,請參閱「查看及管理配額」。

指令列

  1. 使用下列指令,傳回專案的 Cloud Storage 配額資訊:

    gcloud alpha services quota list --service=storage.googleapis.com --consumer=projects/PROJECT_ID

    其中 PROJECT_ID 是專案 ID。

  2. 在 YAML 回應中,尋找下列項目:

    • storage.googleapis.com/google_egress_bandwidth

    • storage.googleapis.com/dualregion_google_egress_bandwidth

    • storage.googleapis.com/multiregion_google_egress_bandwidth

    • storage.googleapis.com/internet_egress_bandwidth

    • storage.googleapis.com/dualregion_internet_egress_bandwidth

    • storage.googleapis.com/multiregion_internet_egress_bandwidth

    如要瞭解頻寬監控指標和代表的資料,請參閱「頻寬監控指標」。

詳情請參閱「使用 Google Cloud CLI 管理配額」。

JSON API

如要瞭解如何以程式輔助方式擷取非雙重區域配額的時間序列資訊,請參閱 ListTimeSeries 指令,並使用下列 filter 值:

  • metric.type="serviceruntime.googleapis.com/quota/rate/net_usage"

  • resource.type="consumer_quota"

  • 可以是下列其中一項:

    • metric.label.quota_metric="storage.googleapis.com/google_egress_bandwidth"

    • metric.label.quota_metric="storage.googleapis.com/internet_egress_bandwidth"

    • metric.label.quota_metric="storage.googleapis.com/multiregion_google_egress_bandwidth"

    • metric.label.quota_metric="storage.googleapis.com/multiregion_internet_egress_bandwidth"

如要瞭解如何以程式輔助方式擷取雙區域配額的時間序列資訊,請參閱「ListTimeSeries 指令」,並使用下列 filter 值:

  • resource.type="storage.googleapis.com/Project"

  • 可以是下列其中一項:

    • metric.type="storage.googleapis.com/quota/dualregion_google_egress_bandwidth/usage"

    • metric.type="storage.googleapis.com/quota/dualregion_internet_egress_bandwidth/usage"

如要瞭解頻寬監控指標和代表的資料,請參閱「頻寬監控指標」。