Skip to content

Conversation

@ghostiee
Copy link
Contributor

@ghostiee ghostiee commented Aug 22, 2024

The __inputs field in efficiency.json will cause the efficiency dashboard restore to fail.

The error message is:
{"message":"dashboard import failed: missing dashboard input variable DS_TESLAMATE","traceID":""}

A sample command to reproduce this behavior is:

curl   --user "admin:admin" --show-error   -X POST -H "Content-Type: application/json"   -d "{\"dashboard\":$(cat ./grafana/dashboards/efficiency.json), \
      \"overwrite\":true, \
      \"folderId\": null, \
      \"inputs\":[{\"name\":\"DS_CLOUDWATCH\", \
      \"type\":\"datasource\", \
      \"pluginId\":\"cloudwatch\", \
      \"value\":\"TeslaMate\"}]}"   "localhost:3000/api/dashboards/import"

Due to the absence of error messages within dashboards.sh and the uninterrupted nature of the restore process, I've added the --fail parameter to the curl command. This modification will cause the restore process to terminate upon encountering an restore failure for the dashboard, allowing for timely detection and resolution of the issue.

@netlify
Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 9fcbf07
🔍 Latest deploy log https://app.netlify.com/sites/teslamate/deploys/66c7261e40f1f30007c25df5
😎 Deploy Preview https://deploy-preview-4153--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@JakobLichterfeld JakobLichterfeld added the area:grafana Related to Grafana label Aug 22, 2024
@JakobLichterfeld
Copy link
Member

JakobLichterfeld commented Aug 22, 2024

Thanks for your change! Nice find!

@swiffer May I ask you to look into the __inputs field in efficency.json , as it was introduced by you with #3971.

@swiffer
Copy link
Collaborator

swiffer commented Aug 27, 2024

Ups - sorry, nice find. yes change looks valid and approved from my end!

Copy link
Member

@JakobLichterfeld JakobLichterfeld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@JakobLichterfeld JakobLichterfeld merged commit cf4f36d into teslamate-org:master Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:grafana Related to Grafana

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants