SigNoz / signoz

SigNoz is an open-source observability platform native to OpenTelemetry with logs, traces and metrics in a single application. An open-source alternative to DataDog, NewRelic, etc. 🔥 🖥. 👉 Open source Application Performance Monitoring (APM) & Observability tool
https://signoz.io
Other
18.66k stars 1.2k forks source link

Problem with auto provisioning the dashboards #3595

Open mstiesto opened 1 year ago

mstiesto commented 1 year ago

Is your feature request related to a problem?

This feature request is related to dashboard provisioning problem. Please describe. I'm attempting to automatically create dashboards during the initial setup of Signoz on Kubernetes clusters. I couldn't find any documentation on this topic, so I'm unsure whether this should be considered a feature request or a bug report. However, I did discover that within the Signoz Query Service, if we place JSON files for dashboards inside the '/root/config/dashboards/' directory, it attempts to read the JSON files and provision the dashboards at startup. Unfortunately, it throws an error when attempting to read these dashboard files: `2023-09-20T09:54:12.504Z INFO dashboards/provision.go:23 Provisioning dashboard: kubernetes-metrics.json panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]: go.signoz.io/signoz/pkg/query-service/app/dashboards.readCurrentDir({0x4000044070, 0x17}, {0x1ce5020, 0x400062e5a0}) /go/src/github.com/signoz/signoz/pkg/query-service/app/dashboards/provision.go:41 +0x52c go.signoz.io/signoz/pkg/query-service/app/dashboards.LoadDashboardFiles({0x1ce5020, 0x400062e5a0}) /go/src/github.com/signoz/signoz/pkg/query-service/app/dashboards/provision.go:59 +0x54 go.signoz.io/signoz/pkg/query-service/app.NewAPIHandler({{0xffff70185c50, 0x40000ec240}, 0x4000780120, 0x1, 0x0, 0x32, 0x64, 0x12a05f200, {0xffff701f3270, 0x400062c1c8}, ...}) /go/src/github.com/signoz/signoz/pkg/query-service/app/http_handler.go:171 +0x488 go.signoz.io/signoz/ee/query-service/app/api.NewAPIHandler({{0x1d06ec8, 0x40000ec240}, 0x4000780120, 0x1, 0x0, 0x32, 0x64, 0x12a05f200, {0x1d05e40, 0x400062c1c8}, ...}) /go/src/github.com/signoz/signoz/ee/query-service/app/api/api.go:46 +0x108 go.signoz.io/signoz/ee/query-service/app.NewServer(0x4000686000) /go/src/github.com/signoz/signoz/ee/query-service/app/server.go:227 +0x4f0 main.main() /go/src/github.com/signoz/signoz/ee/query-service/main.go:142 +0x748`

Describe the solution you'd like

Describe alternatives you've considered

For now seems the only way is to create the dashboards manually.

Additional context

Add any other context or screenshots about the feature request here.

Thank you for your feature request – we love each and every one!

welcome[bot] commented 1 year ago

Thanks for opening this issue. A team member should give feedback soon. In the meantime, feel free to check out the contributing guidelines.

Haavasma commented 1 year ago

The uuid is not part of the "data" field of a dashboard, and will not be exported when exporting to json file. To comply with provisioning, this "uuid" should be added as a field in the metadata when sharing the dashboard.

I have a fix for this, but not sure where to start for contributing