I tried using the JSON provided to create a DS locally. I can import/export without any issues so next questions.
GDG Version
Grafana Version?
Can you try again with the latest version, we moved repos so some of the references are a bit dated and harder to locate. v1.10.0 should be the latest version.
Hi,
We are trying to export ds JSON file but getting the below error, so can you please help here
gdg@aa6ed4e8cc6c:/opt/gdg/bin$ gdg ds export time="2022-03-29T05:22:57Z" level=info msg="Exporting datasources" panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x86b426]
goroutine 1 [running]: github.com/netsage-project/gdg/api.(DashNGoImpl).ExportDataSources(0xc0002a96b0, {0xad3cb8, 0xc0002a9cb0}) /go/src/github.com/netsage-project/gdg/api/datasources.go:108 +0x546 github.com/netsage-project/gdg/cmd.glob..func21(0xde3700, {0x9f53d8, 0x0, 0x0}) /go/src/github.com/netsage-project/gdg/cmd/datasourcesExport.go:16 +0x83 github.com/spf13/cobra.(Command).execute(0xde3700, {0xffe1d0, 0x0, 0x0}) /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:860 +0x5f8 github.com/spf13/cobra.(Command).ExecuteC(0xde4100) /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x3bc github.com/spf13/cobra.(Command).Execute(...) /go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902 github.com/netsage-project/gdg/cmd.Execute() /go/src/github.com/netsage-project/gdg/cmd/root.go:40 +0x25 main.main() /go/src/github.com/netsage-project/gdg/main.go:14 +0x4a
JSON file:- { "orgId": 1, "name": "AlertManagerDS", "type": "camptocamp-prometheus-alertmanager-datasource", "typeLogoUrl": "public/app/plugins/datasource/prometheus/img/prometheus_logo.svg", "access": "proxy", "editable": "false", "url": "http://xxxxxxxxxxxxxxxx.svc", "jsonData": { "severity_critical": "critical", "severity_high": "error", "severity_warning": "warning", "severity_info": "information" }