Site icon Learning & Doing

Migrate Existing Prometheus Monitoring Workloads to Google Cloud

exiting

“Migrate Existing Prometheus Monitoring Workloads to Google Cloud”

Daftar Isi

Pengantar

Dengan pengumpulan data yang diterapkan sendiri, Anda mengelola instalasi Prometheus seperti biasa. Satu-satunya perbedaan dari Prometheus upstream adalah Anda menjalankan Layanan Terkelola untuk biner pengganti drop-in Prometheus, bukan biner Prometheus upstream.

Praktikum

Task 1. Deploy GKE cluster

gcloud container clusters create gmp-cluster --num-nodes=3 --zone=us-central1-c
gcloud container clusters get-credentials gmp-cluster --zone=us-central1-c
kubectl create ns gmp-test

Task 2. Deploy application

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

Task 3. Deploy Prometheus

kubectl -n gmp-test apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.4.3-gke.0/examples/prometheus.yaml

kubectl -n gmp-test get pod

Task 4. Prometheus metrics

gcloud config get-value project
curl https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.4.3-gke.0/examples/frontend.yaml |
sed "s/\$PROJECT_ID/$PROJECT_ID/" | kubectl apply -n gmp-test -f -
kubectl -n gmp-test port-forward svc/frontend 9090

Task 5. Deploy Grafana

git clone https://github.com/prometheus-operator/kube-prometheus.git
cd kube-prometheus
kubectl -n gmp-test apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.4.3-gke.0/examples/grafana.yaml
kubectl -n gmp-test port-forward svc/grafana 3001:3000

Task 6. Grafana

Task 7. Configure data source

Task 8. Grafana chart

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Migrate Existing Prometheus Monitoring Workloads to Google Cloud. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

Exit mobile version