Where do scripted dashboards 'want' their dependencies located?


I’m a newbie to scripted dashboards, so thanks in advance for any help on this.
I’m trying to create a scripted dashboard that has dependencies on this:

  1. What grafana folder(s) must those dependencies be in?
  2. How should I use npm to place those files there?
  3. How can I troubleshoot problems when those dependencies are absent?
    I’m getting this error:
    Script Error Please make sure it exists and returns a valid dashboard
    …and I can’t find any detail on the problem.
    The logs are silent!

Replying to self here.
I"m trying to use this technique to make HTTP requests from a scripted dashboard.
So I tested out that code in nodejs and it worked great.
I then moved it into my copy of scripted.js like this:

var http = require('http');
var req = http.request(options, function(res) {

But I quickly ran intro trouble, getting

“TypeError: require(…) is not a function”

So I tried to go rogue, removed the “require” line and got this: error:

ReferenceError: http is not defined

…so I guess I’ll try this

I am new to Grafana and JavaScript. I followed this and created a JavaScript file
Now my question is , where should I save this file??
How to execute that file??
How to see the graph on grafana dashboard??
Please do reply me. If you have any other links to related to this topic please share them.

You mentioned you want help about uber / grafana-dash-gen, so I’d suggest you ask the owner of that repo, perhaps create a github issue asking for help.

As a first step for learning about Grafana scripted dashboards, I’d suggest running the example:


With a running Grafana instance, this should take just 5-10 minutes to get up and running.