Skip to content
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

Convert JSON to importable Jsonnet #6

Open
AndersBennedsgaard opened this issue Jun 24, 2024 · 2 comments
Open

Convert JSON to importable Jsonnet #6

AndersBennedsgaard opened this issue Jun 24, 2024 · 2 comments

Comments

@AndersBennedsgaard
Copy link

AndersBennedsgaard commented Jun 24, 2024

Is your feature request related to a problem? Please describe.

It is currently hard to make custom changes to dashboards and other from this repository, while still making it possible to get future updates. For example: I would like to add the cluster variable and use DKK as currency in all the queries in https://github.com/opencost/opencost-grafana-dashboard/blob/main/dashboards/cost-reporter/opencost-cost-reporter-basic-overview.json

Describe the solution you'd like

Currently, this repository are described to contain a "Collection of OpenCost Grafana dashboards", which are currently saved as JSON.
I propose to change it to contain OpenCost mixins instead:

A mixin is a set of Grafana dashboards and Prometheus rules and alerts, packaged together in a reuseable and extensible bundle. Mixins are written in jsonnet, and are typically installed and updated with jsonnet-bundler.

It would make sense to have Grafana dashboards, Prometheus rules, and alerts in this repository written in Jsonnet, such that users can import the contents with Jsonnet and change what they want with code, instead of manually patching stuff.

Describe alternatives you've considered

Manually (or using a custom script) adding a cluster="$cluster" label to all dashboards, and what other changes I would like.

@mattray
Copy link
Contributor

mattray commented Jun 27, 2024

This sounds useful, we'd take a PR for sure.

@AndersBennedsgaard
Copy link
Author

Unfortunately, I am not an expert in Jsonnet so I will probably not be the best candidate for this. It could be nice to get someone else on this 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants