grafana-sync: cannot unmarshal number into Go struct field

Hello,

Thank you for Grafana-sync, but I faced this issue during sync my dashboards:

2021/03/05 11:46:32 unmarshal board: json: cannot unmarshal number into Go struct field Board.panels of type string for db/kubernetes-networking-namespace-pods
2021/03/05 11:46:32 unmarshal board: json: cannot unmarshal number into Go struct field Board.panels of type string for db/kubernetes-networking-pod
2021/03/05 11:46:34 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/loki-quick-search
2021/03/05 11:46:36 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/services-overview

Here is a gist with dashboards https://gist.github.com/ingvarch/51ef3022738d3b9011b2ce802a605aaf

I use :

Grafana v7.4.2 (29e75ad97b) Grafana-sync - 1.1.0

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Sorry for my delay. It still doesn’t work. Version 1.4.1

2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-networking-workload
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-persistent-volumes
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-pods
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/kubernetes-statefulsets
2021/08/11 08:36:27 unmarshal board: json: cannot unmarshal object into Go struct field TemplateVar.templating.list.query of type string for db/loki-quick-search

This PR was merged yesterday. Potentially it should resolve issue. Will update code late today

Aug 26 09:22:46 bastion teleport[6630]: SQLite configuration is invalid: failed to unmarshal map[data_dir:/var/lib/teleport path:/var/lib/teleport/backend sync:false] into **lite.Config, json: cannot un>
Aug 26 09:22:46 bastion teleport[6630]: "\tjson: cannot unmarshal bool into Go struct field Config.sync of type string"

config item :

  storage:
    type: sqlite
    sync: OFF

when adding quote to OFF it’s working :

  storage:
    type: sqlite
    sync: "OFF"