lens
lens copied to clipboard
Support realtime resource metrics without prometheus
What would you like to be added: Support realtime CPU/RAM metrics without prometheus needing to be installed, by querying the Kubernetes metrics APIs for nodes/pods where kube-metrics-server is installed
Why is this needed: Our clusters do not run prometheus, yet this information is still available in an alternative format.
Environment you are Lens application on:
- Kubernetes distribution: Custom, running on AWS EC2
- Desktop OS: macOS 10.15
Long time ago (when Lens was still closed source and was running in-cluster) we did pull all the metrics data from metrics-server. Reason why we switched to prometheus was time series data (metrics-server only stores the last value). Do you have already have an idea how Lens could use metrics-server for time series? Local cache?
There are some pages where only the last value is used (getLastMetricValues
), e.g. I was thinking it'd be useful to show the last value of CPU/memory usage when listing pods/nodes, or as a fallback if timeseries data from prometheus isn't available.
I also started experimenting on a branch with running Prometheus locally, but that has a problem - that that will require a tunnel to access the metrics endpoint of every pod/node in the cluster, which doesn't actually help our internal use case where engineers only have access to the API and not to run the port-forward command.
I would love to see this implemented. Time series metrics are nice, and I understand the necessity of something like Prometheus for that, however for the occasions when you just want to see local CPU, RAM, and disk usage in real time, the k8s metrics APIs seems like they would be perfect for that. As @adammw points out, when looking at a list of pods, nodes, etc., you only care about the instantaneous metrics values. This is one of the main reasons I keep going back to k9s.
I have to agree we use some other TSDB for our metrics but it would be a great way yo have metric-server included as an options for current info
I also want to chime in here that the lack of this integration makes it hard to use lens in the same way I use k9s. Getting a list of pods with current CPU/Mem which is updated every so often is useful when checking system health. The time series part could be interesting, but shouldn't be a requirement, as not all clusters have prometheus. For instance, by default a GKE cluster has a metrics-server but not prometheus.
In our use case, we have a victoria metrics cluster for multiple k8s clusters. So we don't want to install Prometheus to each cluster
Completely agree. We don't install the entire prometheus stack in all of our clusters. Many development clusters are very lightweight with only the bare essentials. Supporting metrics-server there would be awesome.
Same thing here - I don't have prometheus installed and didn't intend to, because Kubernetes Metrics Server works just fine with k9s. So I'm using both, k9s and Lens depending on situation.
We have now migrated to datadog instead of prometheus. So getting the historical values of cpu and memory would be had there, but for instantaneous usage metrics i end up having to falling back to k9s.
any news on this topic? context: Edge installations of k8s, where resources are very constrained, might not need prometheus, which is a bit overkill for such application.
relying on metrics server instead would be amazing
I use k3s , do not want to add Prometheus, just want support real time Metrics Server
This is still relevant, please it would be a big enhancement to be able to see metrics from metric-server in real-time despite of not having time series data.
Any chance we can make metrics pluggable? For instance, if there were a way to set a metrics plugin, then as a datadog shop, I could put in an API key and pull time series data from there. The same is probably true of other third party monitoring solutions.
it would be great if Lens could get those metrics from Datadog
subscribing here for updates do not want to have extra prometheus in my test cluster but want to see real time metrics for nodes in lens