GMP Lens Metrics Proxy provides a simple way to see metrics in Lens if you're using Google Cloud Managed Service for Prometheus (GMP) on your Google Kubernetes Engine (GKE) cluster.
Lens only supports metrics provided by prometheus operator. This project acts as a proxy and maps those queries to use ones provided by GMP.
Metrics supported:
- Memory usage/capacity
- CPU usage/capacity
- Volume usage/capacity
- Pods usage/capacity (partly supported)
for Cluster, Node and Pod.
- Create a google service account that has access to Monitoring.
- Create and bind a k8s service account using Workload Identity.
- Deploy miraries/gke-gmp-lens-metrics-proxy
- Point Lens to the deployment
- Done!
For a detailed guide with examples check docs/deployment.md
The mapping of queries is far from ideal - queries are not properly parsed as promql. Instead, only specific queries and labels used by Lens are handled.
Container filesystem metrics are not mapped as no adequate metric exists in GMP (or I couldn't find one).
Node pod capacity is not mapped for similar reasons, but it's faked with hardcoded data as it doesn't change often and the default for GKE clusters is known. This can be improved upon by querying the node info through the k8s api.