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

Error when syncing: cannot unmarshal object into Go struct field Board.panels #43

Closed
telmich opened this issue Feb 5, 2022 · 8 comments

Comments

@telmich
Copy link

telmich commented Feb 5, 2022

Using grafana-sync I receive this error on a specific dashboard:

/ # grafana-sync pull-dashboards --apikey="..." --directory=dashboards --url https://emonitor1.place6.ungleich.ch
2022/02/05 12:08:18 unmarshal board: json: cannot unmarshal object into Go struct field Board.panels of type string for db/uplink-monitoring-2022

Does it help if I paste the dashboard json in here?

@mpostument
Copy link
Owner

This is an issue with grafana SDK itself. I have opened an issue here grafana-tools/sdk#130. But it is not resolved yet. Can you upvote the issue there? Maybe it will speed up process

@mpostument
Copy link
Owner

This error theoretically should be fixed once generics are released grafana-tools/sdk#190 (comment)

@telmich
Copy link
Author

telmich commented Jun 15, 2022

I was wondering if there is any progress now that the grafana-tools/sdk#190 has been merged?

@mpostument
Copy link
Owner

I will deploy new version today

@mpostument
Copy link
Owner

mpostument commented Jun 17, 2022

The new version is built - https://github.com/mpostument/grafana-sync/releases/tag/1.4.8
Please check if this will solve you issue

@telmich
Copy link
Author

telmich commented Jun 23, 2022

I can confirm that a grafana-sync pull & push works smoothly now!

Pulled from grafana 8.3.4
Pushed to grafana 8.4.4

Thanks a lot for fixing it!

@telmich telmich closed this as completed Jun 23, 2022
@bixu
Copy link

bixu commented Feb 22, 2024

We are still seeing this error with the 1.7.0 release. For example:

2024/02/22 15:47:33 unmarshal board: json: cannot unmarshal object into Go struct field Target.targets.groupBy of type string (panel "CPU usage/s for $instance" of type "graph") (panel "Resources" of type "row") for db/alertmanager
2024/02/22 15:47:35 unmarshal board: json: cannot unmarshal object into Go struct field Target.targets.tags of type []struct { Key string "json:\"key,omitempty\""; Operator string "json:\"operator,omitempty\""; Value string "json:\"value,omitempty\"" } (panel "Global Samples Sent by Remote" of type "timeseries") for db/prometheus-remote-storage-stats

CC @BouchaaraAdil

@BouchaaraAdil
Copy link

@bixu i added a coment last week already here #6 (comment)

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

No branches or pull requests

4 participants