rancher: [BUG][rancher-monitoring] Grafana dashboard clusterID is missing when installed using Helm CLI
Rancher Server Setup
- Rancher version: v2.7-head
- Installation option (Docker install/Helm Chart):
- If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): Helm chart
- Proxy/Cert Details: N/A
Information about the Cluster
- Kubernetes version: v1.24.10
- Cluster Type (Local/Downstream):
- If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): Downstream RKE on Digital Ocean
User Information
- What is the role of the user logged in? (Admin/Cluster Owner/Cluster Member/Project Owner/Project Member/Custom) Default Admin
Describe the bug
When rancher-monitoring gets installed via CLI, the value global.cattle.clusterId is not automatically set. This results in incorrect configuration for the nginx proxy, which in turn breaks the Grafana dashboard.
To Reproduce
- Create a downstream cluster.
- Copy the kubeconfig file from that cluster and export
KUBECONFIGpointing to the downloaded file in a terminal. - Clone the rancher/charts repository in a local machine folder.
- Navigate to the cloned repository.
- Install the required CRDs:
helm upgrade --install \ --namespace cattle-monitoring-system \ rancher-monitoring-crd charts/rancher-monitoring-crd/102.0.0+up40.1.2 - Install the cloned copy of the rancher-monitoring chart without specifying any
values.yaml:helm upgrade --install \ --namespace cattle-monitoring-system \ rancher-monitoring charts/rancher-monitoring/102.0.0+up40.1.2
Result
The chart is installed seemingly successfully, but the dashboard page shows an HTTP 404 error when accessed. Some dashboards are accessible but most of the links break.
Expected Result
I expected either the chart to be correctly installed and the dashboards to work, or the installation to fail telling me that the cluster ID is required.
Additional context
This issue has a workaround: adding --set global.cattle.clusterId=<cluster-id> when installing the chart. It would be useful if the chart errored out when the value is unset however.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 22
@staedter your solution was super close. I’m also in fleet land and ran in to this issue. Instead of having your helm vars in dot notation, you need them to be proper yaml
doing that, removing the chart and letting fleet reinstall it fixed the issue for me.
Is there news about this? I am hitting this bug too
Following up with additional findings. From a basic install of Cluster Tools > Monitoring we observe 3 URL link inconsistences:
the Monitoring > Grafana link is: https://xxx.com/k8s/clusters/local/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy this links returns the 404 and should be: https://xxx.com/k8s/clusters/local/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/
the Grafana > Sign in link is: https://xxx.com/k8s/clusters/local/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/login?forceLogin=true this link returns the 404 and should be: https://xxx.com/k8s/clusters/local/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/login
the Grafana > Sign out link is: https://xxx.com/signout this link logs you out of Rancher instead of logging you out of Grafana and should be: https://xxx.com/k8s/clusters/local/api/v1/namespaces/cattle-monitoring-system/services/http:rancher-monitoring-grafana:80/proxy/logout
Currently we have to manually override these links each time they are used.
Dose anybody know how to fix these links via configuration.
Appreciate any guidance on this.
BTW - everything else seems to be working for Monitoring
Greetings,
having the same issue using: Cluster Tools > Monitoring v102.0.0+up40.12 on Rancher v2.7.2 and v1.25.7+rke2r1
using “Customize Helm options before install” and “Edit YAML” to set:
is not working for either new install or upgrade
hoping someone has another work around
Thanks,
Doug
I am experiencing the same issue as well. Cluster metrics shows “Page Not Found”. I tried Stormqueen1990’s workaround to no avail until I noticed that she did not case it correctly.
–set global.cattle.clusterID=<cluster-id> does not work because there is no variable with that casing.
The proper casing is global.cattle.clusterId=<cluster-id>. My installation was a local install using the RKE2 quick start guide. My cluster was automatically named local. So the command that worked for me was:
helm install rancher-monitoring rancher-charts/rancher-monitoring -n cattle-monitoring-system --create-namespace --set global.cattle.clusterId=local
If you’re upgrading an existing install then the following should work:
helm upgrade -i rancher-monitoring rancher-charts/rancher-monitoring -n cattle-monitoring-system --set global.cattle.clusterId=<cluster-id>
Thank you Stormqueen for finding a workaround.