arrow_back

Monitor Environments with Google Cloud Managed Service for Prometheus: Challenge Lab

登录 加入
访问 700 多个实验和课程

Monitor Environments with Google Cloud Managed Service for Prometheus: Challenge Lab

实验 1 小时 30 分钟 universal_currency_alt 5 积分 show_chart 中级
info 此实验可能会提供 AI 工具来支持您学习。
访问 700 多个实验和课程

GSP364

Google Cloud self-paced labs logo

Introduction

In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.

When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.

To score 100% you must successfully complete all tasks within the time period!

This lab is recommended for students enrolled in the Monitor Environments with Google Cloud managed Service for Prometheus course. Are you ready for the challenge?

Lab Objectives

In this lab, you will learn how to:

  • Deploy the Managed Service for Prometheus
  • Create a self managed data collection for scraping metrics
  • Deploy an application to query metrics

Task 1. Deploy a GKE cluster in

Task 2. Deploy a managed collection

Note: You will need to utilize a flag when issuing the command to create the GKE cluster in order to enable the Managed Service for Prometheus. Note: You should use the setup and operator manifest files to complete this challenge. For more information, refer to GoogleCloudPlatform/prometheus-engine.

Task 3. Deploy an example application

Note: Use the following manifest: example-app.yaml Check if prometheus has been deployed

Task 4. Filter exported metrics

  1. Add the following to operator config to filter metrics
collection: filter: matchOneOf: - '{job="prom-example"}' - '{__name__=~"job:.+"}'
  1. Create a config.yaml file
vi op-config.yaml
  1. Copy the contents of operatorconfig inside the config.yaml file

  2. Upload the config file you created to verify.

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 Check if metrics filter has been applied

Congratulations

In this lab you have deployed Prometheus and a example application. Then you have applied a filter to the exported metrics.

Monitor Environments with Google Cloud Managed Service for Prometheus Skill Badge

Google Cloud training and certification

...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.

Manual Last Updated: April 18, 2024

Lab Last Tested: October 13, 2023

Copyright 2025 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.

准备工作

  1. 实验会创建一个 Google Cloud 项目和一些资源,供您使用限定的一段时间
  2. 实验有时间限制,并且没有暂停功能。如果您中途结束实验,则必须重新开始。
  3. 在屏幕左上角,点击开始实验即可开始

使用无痕浏览模式

  1. 复制系统为实验提供的用户名密码
  2. 在无痕浏览模式下,点击打开控制台

登录控制台

  1. 使用您的实验凭证登录。使用其他凭证可能会导致错误或产生费用。
  2. 接受条款,并跳过恢复资源页面
  3. 除非您已完成此实验或想要重新开始,否则请勿点击结束实验,因为点击后系统会清除您的工作并移除该项目

此内容目前不可用

一旦可用,我们会通过电子邮件告知您

太好了!

一旦可用,我们会通过电子邮件告知您

一次一个实验

确认结束所有现有实验并开始此实验

使用无痕浏览模式运行实验

请使用无痕模式或无痕式浏览器窗口运行此实验。这可以避免您的个人账号与学生账号之间发生冲突,这种冲突可能导致您的个人账号产生额外费用。