-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Metrics doesn't work (loadKubeMetrics failed) 404 page not found #6510
Comments
|
Yes node-exporter-stack installed, but Metrics Server by default not installed in AWS EKS (https://docs.aws.amazon.com/eks/latest/userguide/metrics-server.html) |
Yes if you want metrics to show up there you will need metrics server setup. Though from the stack trace that should have only shown up when you open a node details panel. If you are asking about why the metrics bars are not showing up on the node list view that is a different issue... |
And what problem is? |
Probably that there are no metrics to retrieve or the provider is misconfigured. |
In Grafana all data displayed without issues, what configuration i can paste to help you? |
Under cluster settings what is the "Metrics Provider" configured to? |
I tried different, |
Which version of prometheus are you currently using? |
Chart: kube-prometheus-stack |
Can you try using |
You mean this one? https://artifacthub.io/packages/helm/prometheus-community/prometheus |
Ah, got it, do I need to place path to the service or leave it blank? |
I think something changed with the last update. Yesterday it was still working for me. Now after the update with the same configuration for Prometheus Operator no metrics are showing up. |
Nothing has been changed from an open-lens perspective with regards to metrics recently. The last change really was https://github.com/lensapp/lens/releases/tag/v6.1.0-alpha.1 about 2 months ago |
Okay, thanks for the quick response |
@OHaimanov, since you are using the kube-prometheus-stack chart, the "Prometheus Operator" option should be the right one. The following config worked for me in the past. For some reason it stopped working today... Although I must say that I have been tinkering around with kube-prometheus-stack. Note that the |
Yeah, i also think so, and tried also this option without any result |
Does lens write any logs to system? |
Yes it does. It should be under |
warn: [METRICS-ROUTE]: failed to get metrics for clusterId=: Metrics not available {"stack":"Error: Metrics not available\n at /Applications/Lens.app/Contents/Resources/app.asar/static/build/main.js:1:416744\n at process.processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async Promise.all (index 0)\n at async /Applications/Lens.app/Contents/Resources/app.asar/static/build/main.js:1:417492\n at async Object.route (/Applications/Lens.app/Contents/Resources/app.asar/static/build/main.js:1:407233)\n at async a.route (/Applications/Lens.app/Contents/Resources/app.asar/static/build/main.js:1:409650)"} |
Sigh... I guess the best I can do is get some better logging into the next version we release. Sorry about this. |
Ok, np, let's wait for new release) |
@Nokel81, where are the logs located on Windows? |
Should be |
Just tried it again and now the metrics reappeared. No idea what has changed |
@Nokel81 is metrics use kube-proxy in flow? |
Yes, all our requests go through a kube proxy |
Hmmm, ok let me check one thing |
Nah, my idea related to this issue aws/containers-roadmap#657 doesn't work, i've updated cluster to 1.22, kube-proxy green in prometheus, but in lens no result |
@trallnag (+) If you did, how did you apply https://github.com/lensapp/lens/blob/master/troubleshooting/custom-prometheus.md ? |
Just add this to values of kube-prometheus-stack
|
Yeah I applied the same values for
and
Mine still does not work :/ Locally similar to all of you above, showing below logs.
|
The "Prometheus Operator" provider looks for a kube service with the label selector of |
@Nokel81 |
Is there any (alternative) solution to fix this? ;( |
Until #6576 is merged it is hard to diagnose why this is happening. |
@Nokel81 I have following error stack.
|
Have you had any luck with this? I can see that lens was able to connect to remote prometheus service with kubectl port-forward, I even can see the metrics in my web browser but not in the lens itself.
|
Funny thing - it started working when we drained nodes under the Prometheus and Prometheus moved to another node. For 2 clusters it moved to different kinds of nodes for another 2 clusters it moved to the same kind of node, but a new one. It's working for all our clusters now. |
Hello. This solution doesn't work either: https://github.com/lensapp/lens/blob/master/troubleshooting/custom-prometheus.md#manual There is a connection to the service, Lens automatically detects the service. If anyone needs it, here is an example of the service. Don't forget to add appropriate labels to the deployment.
Now let's move on to the errors. I won't show anything new here. Lens logs.
@Nokel81 could you please tell me how I can see which request(metric) has an error and what exactly is missing? If I know which metric isn't working, I can see what's wrong(probably other labels). Prometheus installation: https://artifacthub.io/packages/helm/prometheus-community/prometheus At the moment, the latest version of Lens and Prometheus are installed. |
Same for me in AWS EKS K8S v1.25.11-eks.
Seem related to #7888 |
If you are referring to an EKS cluster, the issue might relate to the node-to-node security group. In the AWS Terraform module for EKS, you can specify additional rules for the security group that manages node-to-node communication as follows: node_security_group_additional_rules = {
# Allow all traffic between nodes
ingress_self_all = {
description = "Allow all traffic between nodes on all ports/protocols"
protocol = "all"
from_port = 0
to_port = 0
type = "ingress"
self = true
}
# Allow HTTP traffic from the cluster API to the nodes
ingress_api_to_nodes = {
description = "Cluster API access to Kubernetes nodes"
protocol = "tcp"
from_port = 80
to_port = 65535
type = "ingress"
source_cluster_security_group = true
}
} This change will allow lens to talk to prometheus which could be in a different node |
Many thanks, the node_security_group_additional_rules resolved my metrics display in lens for eks cluster Kubernetes version: 1.30 |
We have the same problem, but we have the pod metrics, but no cluster nor the nodes metrics.
Logs errors: |
Describe the bug
Lens app doesn't display metrics, in developer tools console message (loadKubeMetrics failed error: "404 page not found\n")
Tested on embedded Lens Metrics and kube-prometheus-stack (chart version: 41.7.3)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Metrics for Cluster, Nodes, Pods are shown
Screenshots

Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: