Lab setup instructions and requirements
Protect your account and progress. Always use a private browser window and lab credentials to run this lab.

使用 Google Cloud Managed Service for Prometheus 監控環境:挑戰實驗室

Lab 15 minutes universal_currency_alt 5 Credits show_chart Intermediate
info This lab may incorporate AI tools to support your learning.
This content is not yet optimized for mobile devices.
For the best experience, please visit us on a desktop computer using a link sent by email.

GSP364

Google Cloud 自學實驗室標誌

簡介

在挑戰研究室中,您會在特定情境下完成一系列任務。挑戰研究室不會提供逐步說明,您將運用從課程研究室學到的技巧,自行找出方法完成任務!自動評分系統 (如本頁所示) 將根據您是否正確完成任務來提供意見回饋。

在您完成任務的期間,挑戰研究室不會介紹新的 Google Cloud 概念。您須靈活運用所學技巧,例如變更預設值或詳讀並研究錯誤訊息,解決遇到的問題。

若想滿分達標,就必須在時限內成功完成所有任務!

這個實驗室適合使用 Google Cloud Managed Service for Prometheus 監控環境課程的學員。準備好迎接挑戰了嗎?

實驗室目標

本實驗室的學習內容包括:

  • 部署 Managed Service for Prometheus
  • 建立自行管理的資料收集機制,用於抓取指標
  • 部署應用程式來查詢指標

工作 1:在 部署 GKE 叢集

工作 2:部署代管收集功能

注意: 發出指令建立 GKE 叢集時,您必須使用旗標來啟用 Managed Service for Prometheus。 注意: 請使用設定和運算子資訊清單檔案完成這項挑戰。詳情請參閱 GoogleCloudPlatform/prometheus-engine

工作 3:部署範例應用程式

注意: 請使用下列資訊清單: example-app.yaml 檢查 Prometheus 是否已部署

工作 4:篩選匯出的指標

  1. 在運算子設定中加入下列內容以篩選指標
collection: filter: matchOneOf: - '{job="prom-example"}' - '{__name__=~"job:.+"}'
  1. 建立 config.yaml 檔案
vi op-config.yaml
  1. 複製 config.yaml 檔案中 operatorconfig 的內容

  2. 上傳您建立的設定檔進行驗證:

export PROJECT=$(gcloud config get-value project) gsutil mb -p $PROJECT gs://$PROJECT gsutil cp op-config.yaml gs://$PROJECT gsutil -m acl set -R -a public-read gs://$PROJECT 確認指標篩選條件是否已套用

恭喜

在本實驗室中,您部署了 Prometheus 和範例應用程式,然後對匯出的指標套用了篩選條件。

「使用 Google Cloud Managed Service for Prometheus 監控環境」技能徽章

Google Cloud 教育訓練與認證

協助您瞭解如何充分運用 Google Cloud 的技術。我們的課程會介紹專業技能和最佳做法,讓您可以快速掌握要領並持續進修。我們提供從基本到進階等級的訓練課程,並有隨選、線上和虛擬課程等選項,方便您抽空參加。認證可協助您驗證及證明自己在 Google Cloud 技術方面的技能和專業知識。

使用手冊上次更新日期:2024 年 4 月 18 日

實驗室上次測試日期:2023 年 10 月 13 日

Copyright 2025 Google LLC 保留所有權利。Google 和 Google 標誌是 Google LLC 的商標,其他公司和產品名稱則有可能是其關聯公司的商標。

Before you begin

  1. Labs create a Google Cloud project and resources for a fixed time
  2. Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
  3. On the top left of your screen, click Start lab to begin

Use private browsing

  1. Copy the provided Username and Password for the lab
  2. Click Open console in private mode

Sign in to the Console

  1. Sign in using your lab credentials. Using other credentials might cause errors or incur charges.
  2. Accept the terms, and skip the recovery resource page
  3. Don't click End lab unless you've finished the lab or want to restart it, as it will clear your work and remove the project

This content is not currently available

We will notify you via email when it becomes available

Great!

We will contact you via email if it becomes available

One lab at a time

Confirm to end all existing labs and start this one

Use private browsing to run the lab

Using an Incognito or private browser window is the best way to run this lab. This prevents any conflicts between your personal account and the Student account, which may cause extra charges incurred to your personal account.