Created
November 29, 2017 16:32
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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