Monday, November 11, 2024
GCP GKE Grafana Juara GCP Monitoring Prometheus

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

  • Deploy GKE
gcloud container clusters create gmp-cluster --num-nodes=3 --zone=us-central1-c
gcloud container clusters get-credentials gmp-cluster --zone=us-central1-c
  • Buat namespace
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
  • deploy grafana
kubectl -n gmp-test apply -f https://raw.githubusercontent.com/GoogleCloudPlatform/prometheus-engine/v0.4.3-gke.0/examples/grafana.yaml
  • forward ke GUI
kubectl -n gmp-test port-forward svc/grafana 3001:3000

Task 6. Grafana

Task 7. Configure data source

  • Buka datasource
  • masukan prometehus
  • tambahkan httpd metode dan get
  • klik save and test

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.

(Visited 82 times, 1 visits today)
Baca Juga :  Deploy Kubernetes Load Balancer Service dengan Terraform

Similar Posts