Skip to content

Instantly share code, notes, and snippets.

@oriolrius
Created November 29, 2017 16:32
Show Gist options
  • Save oriolrius/a580c1d56809570a97ecc062b2224b3d to your computer and use it in GitHub Desktop.
Save oriolrius/a580c1d56809570a97ecc062b2224b3d to your computer and use it in GitHub Desktop.
this is a hello world test for grafana scripted dashboards, please refer to this video for more information: http://oriolrius.cat/blog/2017/11/24/scripted-grafana-dashboards/
'use strict';
var dashboard;
dashboard = {
title: 'this is just a test',
rows : [],
};
dashboard.time = {
from: "now-6h",
to: "now"
};
dashboard.rows.push({
title: 'Chart',
panels: [
{
title: 'el titol',
type: 'graph',
span: 12,
fill: 1,
linewidth: 2,
targets: [
{
'target': "randomWalk('prova')"
},
{
'target': "randomWalk('random walk2')"
}
]
}
]
});
return dashboard;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment