K-Phoen / grabana

User-friendly Go library for building Grafana dashboards
MIT License
680 stars 69 forks source link

Replace part of the remote dashboard #232

Closed Antiarchitect closed 8 months ago

Antiarchitect commented 1 year ago

Hi and thank you so much for this awesome project! I really like it so far and generating dashboards from scratch is working just fine. Is there any way to obtain the remote dashboard (e.g. in form of dashboard.Builder or DashboardModel) in order to replace some part of it with a part from the dashboard rendered locally and send it back to grafana via client.UpsertDashboard?

The case: I have very complex dashboards with multiple sources of truth (multiple repos) and I would like to detect (maybe using the panel description filed or in any other appropriate way) a subset of panels from the remote board, replace it with locally generated panels and sent the dashboard back to the grafana. Is that in any way possible now?

Thank you in advance! <3

K-Phoen commented 8 months ago

Hey!

Unfortunately, modifying existing dashboards (while being a very valid and valuable use-case) is not something that fits the scope that I chose for this project. Grabana has always been about builders and exclusively builders, and I currently don't have any plans to extend that scope.

Your best bet to achieve this would be to use K-Phoen/sdk directly (or a similar library)