Sunday, December 4, 2022
GCP Juara GCP

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

Challenge

Solusi

Task 1 – Deploy GKE

gcloud beta container clusters create gmp-cluster --num-nodes=1 --zone us-central1-f --enable-managed-prometheus

gcloud container clusters get-credentials gmp-cluster --zone=us-central1-f

kubectl create ns gmp-test

Task 2 – Deploy a managed collection

kubectl -n gmp-test apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.2.3/examples/pod-monitoring.yaml

Task 3 – Deploy an example application

kubectl -n gmp-test apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.2.3/examples/example-app.yaml

Task 4. Filter exported metrics

vi op-config.yaml

Add to File

collection:
  filter:
    matchOneOf:
    - '{job="prom-example"}'
    - '{__name__=~"job:.+"}'
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

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Monitor Environments with Google Cloud Managed Service for Prometheus: Challenge Lab. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

(Visited 8 times, 1 visits today)
Baca Juga :  A Tour of Google Cloud Hands-on Labs

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *