-
Notifications
You must be signed in to change notification settings - Fork 418
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
Grafana dashboards imported the sidecar with an hardcoded datasource. #744
Comments
Hi @pierluigilenoci there are legacy reasons we do this. We're open to implementing a set of dashboards that use the DS_PROMETHEUS templating, but is a workaround for now just to create a datasource that is called "default-kubecost" in your grafana dashboard? |
I've already used this workaround for my PoC with Kubecost but it still remains a dirty trick to get things working. In my specific case, however, it is not sufficient because I have a single Grafana installation to which all Prometheus installations are connected as datasource. So only one works at a time. As I said in another ticket, in my opinion, the chart should reward those who update their software compared to those who run legacy versions. In any case, forcing the usage of external workarounds and dirty tricks to make things work does not give a good product image. Ref: #747 (comment) |
@AjayTripathy any update? |
@Sean-Holcomb were you going to look at this? |
I have updated all of our Grafana templates to include the datasource dropdown that was suggested above. This should be available in the release going out tomorrow. |
Fixed in v1.76! Thanks, @Sean-Holcomb. Let us know if we can get you anything else on this! |
@dwbrown2 in reality, this is not completely resolved. Now if you have more than one datasource from different Kubecost installations, the dashboard that is opened from the links of the Kubecost UI does not pull up the right datasource that needs to be adjusted by hand. The correct datasource name should be added in the installation and then the parameter added in the UI in this way: |
I created this issue as follow up #817 |
Describe the bug
All the dashboards imported by the sidecar are using
"datasource": "default-kubecost"
.If you use a custom installation of Grafana and Prometheus, the dashboards cannot be used.
To Reproduce
Install kubecost with a custom Prometheus and Grafana installation and name the Prometheus datasource with something other than
default-kubecost
.Expected behavior
Being able to use dashboards in a custom installation.
There are two possibilities:
Tip for the second option: change the datasource in the dashboard in this way
"datasource": "${DS_PROMETHEUS}"
and add a dropdown list in the templating part like:The text was updated successfully, but these errors were encountered: